I have this code:
active = True
print("Hello, this is the pricing system for the theater.")
print("Depending on your age, your pricing will vary.")
print("Please type 'exit' to termiante the program")
toddler = "Below 3 = Free."
kid = "3-2 = $10"
big_kid = "12+ = $15"
prompt = "Please enter your age: "
while active:
message = input(prompt)
if message == "exit":
break
if message != type(int):
print("Int only")
continue
message = int(message)
if message < 3:
print(toddler)
elif message > 3 and message < 12:
print(kid)
else:
print(big_kid)
I am basically trying to tell python that if the value that was entered is not an integer, to go back to the beginning and input an int. However, even if the user does put an int, it keeps telling me "int only". What am I doing wrong here?