def main(): acceptable_rounds = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"] new = input("Would you like instructions on how to play? (yes or no)") while True: if new == "yes": instructions() break elif new == "no": break else: print("I don't know what you mean.") new = input( "Would you like instructions on how to play? (yes or no)") again = "yes" while again == "yes": rounds = input("How many rounds would you like to play? (1-10)") while rounds not in acceptable_rounds: print("That as an invalid input for rounds.") rounds = input("How many rounds would you like to play? (1-10)") game = Trashcan(int(rounds)) check = True while check: check = game.play() again = input("Would you like to play again? (yes or no)") while True: if again == "yes" or again == "no": break else: print("I don't know what you mean.") again = input("Would you like to play again? (yes or no)") print("Thank you for playing.")