import random number = random.randint(1 , 100) correct = "n" while correct == "n": guess = int(input( "Guess the number:" )) if guess == number: print( "You got it!" ) correct = "y" if guess > number: print( "Lower!") correct = "n" if guess < number: print( "Higher!" ) correct = "n"