I was making Tic-Tac-Toe and I want to ask the player if they want to play again after the game is over. If they say yes, the game will start again. if they say no, the game says Have a nice day and the game stops.
But I'm having trouble with the while-loop.
If I were to do this:
continue = True
While continue:
(game codes)
continue = input("Would you like to play again? (yes/no)")
if continue == "yes":
continue = True
elif continue == "no":
continue = False
print("Goodbye!")
The game just keeps going on, if i remove the continue = True, the code gets an error. The error is "name 'continue' is not defined"
Could someone help me please?