File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 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+ else :
9+ print ("Leap year" )
10+ else :
11+ print ("Not a leap year" )
Original file line number Diff line number Diff line change 1+ height = int (input ("What is your height?" ))
2+ bill = 0
3+ if height >= 3 :
4+ print ("Can ride" )
5+ age = int (input ("What is your age?" ))
6+ if age < 12 :
7+ bill = 150
8+ print ("Ticket price is 150 Rs." )
9+ elif age <= 18 :
10+ bill = 250
11+ print ("Ticket price is 250 Rs." )
12+ else :
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+ else :
20+ print ("Cant ride" )
21+ print ("bye" )
You can’t perform that action at this time.
0 commit comments