I am trying to make a game.
Hello and good day. I'm trying to make a "guess the number" game but have a problem. The game works great right now but It's very simple. I'm trying to make it so that I can have a user input a number, and if it is wrong, they can try again using one of their lives. I'm off to a good start so far I think. Problem: How can I make it so that a user can input again if they guess incorrectly? Currently when the user guesses incorrectly, the game is over as I can't figure out how to let the user add another input. Can anyone help me? The code is below...: import random rnum = random.randint(0, 5) guess = int(input()) chances = 0 while chances >= 0: if guess == rnum: print("you got it!") break elif guess != rnum: print("That's not it!") chances = 0+1 print('You have used', chances, 'of your chances.') break continue