We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66e7a10 commit 7130007Copy full SHA for 7130007
2 files changed
excercise_8_leapyear.py
@@ -0,0 +1,11 @@
1
+year=int(input("enter year:"))
2
+if year%4==0:
3
+ if year%100==0:
4
+ if year%400==0:
5
+ print("Leap year")
6
+ else:
7
+ print("Not a leap year")
8
9
10
+else:
11
multiple_if_stat.py
@@ -0,0 +1,21 @@
+height=int(input("What is your height?"))
+bill=0
+if height>=3:
+ print("Can ride")
+ age=int(input("What is your age?"))
+ if age<12:
+ bill=150
+ print("Ticket price is 150 Rs.")
+ elif age<=18:
+ bill=250
+ print("Ticket price is 250 Rs.")
12
13
+ bill=500
14
+ print("Ticket price is 500 Rs.")
15
+ want_photo=input("Do you want to take photo(Y/N)?")
16
+ if want_photo=='y' or want_photo=='Y':
17
+ bill=bill+50
18
+ print(f"Your total bill is {bill}.")
19
20
+ print("Cant ride")
21
+print("bye")
0 commit comments