# functions go here # num checker def num_check(question): while True: try: response = int(input(question)) return response except ValueError: print("please enter a number") # main routine goes here tickets_sold = 0 while True: name = input("Enter your name / xxx to quit: ") if name == "xxx": break age = num_check("Age: ") if 12 <= age <= 120: pass elif age < 12: print("sorry your to young for this movie") continue else: print("that looks like a typo please try again.") continue tickets_sold += 1