import random num = random.randint(0,10) guessed_it = False print("I’m thinking of a number.") while not guessed_it: guess = int(input("Guess it: ")) guessed_it = (num == guess) print("Well done!")