import random secretnumber = random.randint(1, 100) print("I'm thinking of a number...") isitguessed = False while isitguessed == False: numguessed = int(input("Guess the number: ")) if numguessed == secretnumber: print("You got it") isitguessed = True break elif secretnumber > numguessed: print("Higher!") elif secretnumber < numguessed: print("Lower")