-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcondition.py
More file actions
26 lines (22 loc) · 759 Bytes
/
Copy pathcondition.py
File metadata and controls
26 lines (22 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
print("Welcome to the rollercoaster!")
height = int(input("What is your height in cm? \n"))
if height > 120:
print("You can ride the rollercoaster!")
age= int(input("What is your age ? "))
if age < 12:
print("The ticket price is $5.")
elif age <= 18:
print("The ticket price is $7.")
else:
print("The ticket price is $12.")
else:
print("Sorry, you have to grow taller before you can ride.")
# if height > 120:
# print("You can ride the rollercoaster!")
# age= int(input("What is your age ?"))
# if age <= 18:
# print("The ticket price is $7.")
# else:
# print("The ticket price is $12.")
# else:
# print("Sorry, you have to grow taller before you can ride.")