# checks users enter yes (y) or no (n) def yes_no(question): while True: response = input(question).lower() # checks user response, question # repeats if users don't enter yes / no if response == "yes" or response == "y": return "yes" elif response == "no" or response == "n": return "no" else: print("Please enter yes / no") def instruction (): print(''' **** Instructions **** Do something and then do something else etc ''') #Checks that users enter an integer # that is more than 13 def int_check(): while True: error = "Please enter an integer that is 13 or more." try: response = int(input("Enter an integer: ")) # checks that the number is more than / equal to 13 if response < 13: print(error) else: return response except ValueError: print(error) # Main routine print() print("Roll it 13") print() # loop for testing purposes # ask user if they want to see the instructions and display # them if requested want_instructions = yes_no("Do you want to read the instructions? ") # checks users enter yes (y) or no (n) if want_instructions == "yes": instruction() print("program continues") target_score = int_check()