from random import randint
guessed = randint(0,2)
user_guess = input("What do you think the number I'm thinking of is?")
if user_guess == guessed:
print("Correct!")
else:
print("Incorrect!")
I'm looking for a way for the code to repeat or a way to print different messages until user_guess is the same as guessed.
If the person guesses incorrectly, I want to be able to tell them that, and then give them another chance.
Thanks, sorry for beginner question.