I am trying to get this code to take you back to the 'Yes or No?' input if the user types an invalid input. Can you help me? Here is my code so far:
def print_options():
print("~DICE GAME~")
print(" 'p' Print this menu again")
print(" '1' Play")
print(" '2' Instructions")
print(" '3' Quit Game")
choice = "p"
while choice != "3":
if choice == "1":
print("****Welcome to the Matrix Game****")
print("Enter the names for players 1 and 2")
player1=input("Enter the name of Player 1:")
player2=input("Enter the name of Player 2:")
print("Welcome",player1, "and",player2, ", are you ready to conquer
the matrix?")
response=input("Yes or No?")
if response=="yes" or "Yes" or "yES":
loadstartgame(player1, player2)
elif response=="no" or "No" or "nO"?:
sys.exit()
else:
print("invalid choice")
#here is where i want to go back to the yes or no question