#functions go here def yes_no(question): """checks user responce to a question is yes / no (y/n), returns 'yes' or 'no' """ while True: response = input(question).lower() # check the user says yes / no/y/n if response == "yes" or response == "y" or response == "Yes" or response == "YES": return "yes" elif response == "no" or response == "n" or response == "No" or response == "NO": return "no" else: print("please answer yes or no ") def instructions(): """prints instructions""" print("""instructions""") def int_check(): """Checks users enter an integer more than / equal to 13""" error = "Please enter an integer more then / equal to 13." while True: try: response = int(input("what is the game goal? ")) if response < 13: print(error) else: return response except ValueError: print(error) #main routine #ask the user if they want instructions (check they say yes / no want_instructions = yes_no("Do you want to see the instructions? ") # Display the instructions if the user wants to see them... if want_instructions == "yes": instructions() print() game_goal = int_check() print(game_goal)