# functions go here # usage def yes_no(question): while True: response = input(question).lower() # check the user says yes / no / y / n if response == "yes" or response == "y": return "yes" elif response == "no" or response == "n": return "no" else: print("please enter yes / no") def instructions(): """ Prints instructions """ print(""" *** Instructions **** Roll the dice and try to win! """) def int_check(): """Checks users enter an integer more than / equal to 13""" error = "Please enter an integer more than / 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 want_instructions = yes_no("Do you want to see the instructions? ") if want_instructions == "yes": instructions() game_goal = int_check() print(game_goal)