Skip to content

Commit 1e1e250

Browse files
committed
Added nested_elif.py to Python-Basic-to-Advance repo
1 parent 80e6760 commit 1e1e250

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

nested_elif.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
height = int(input("What is your height in feet: "))
2+
3+
if height >= 3:
4+
print("You can ride")
5+
age = int(input("What is your age: "))
6+
if age < 12:
7+
print("Pay 150 Rs")
8+
elif age <= 18:
9+
print("Pay 250 Rs")
10+
else:
11+
print("Pay 500 Rs")
12+
else:
13+
print("Cant Ride")
14+
15+
print("Bye")

0 commit comments

Comments
 (0)