forked from inbravo/python-feature-set
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rollercoaster v6.py
32 lines (28 loc) · 926 Bytes
/
Rollercoaster v6.py
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
27
28
29
30
31
32
print("Welcome to the rollercoaster!")
height = int(input("Please enter your height in cm: "))
bill = 0
# can ride
if height >= 120:
age = int(input("You are tall enough to ride the rollercoaster, please enter your age: "))
if age < 12:
print("Child Tickets are $5")
bill = 5
elif age < 18:
print("Teenager Tickets are $10")
bill = 10
elif age >= 45 or age <= 55:
bill = 0
print("You've most probably got midlife crisis so you can ride for free.")
else:
print("Adult Tickets are $12")
bill = 12
#for picture
choice = str(input("Pictures cost an additional of $3. Do you want a picture taken (Y or N): "))
if choice == "Y":
bill += 3
print(f"Your total bill is ${bill}.")
else:
print(f"Your total bill is ${bill}.")
# can"t ride
else:
print("You are not tall enough to ride the rollercoaster.")