I've been reading through a beginner's book for Python, and I can't quite get this example to work perfectly.
active = True
age = ""
while active:
age = input("Please enter your age ")
if str(age) == 'quit':
active = False
elif int(age) < 3 and int(age) != 0:
price = 0
elif int(age) >= 3 and int(age) <= 12:
price = 10
elif int(age) > 12:
price = 15
print(str(price) + " dollars is the cost of your ticket")
Everything works perfectly, except for the fact that when I type "quit", instead of quitting it says " X dollars is the cost of your ticket" (X being the last amount of dollars it said I owed it.) Thanks for the help!