import random num = random.randint(0,101) guesses = 0 print("I'm thinking of a number...") gnum = int(input("Guess the number:")) while num != gnum: if gnum == num: print("You got it!") else: if gnum < num: print("Higher!") elif gnum > num: print("Lower!") gnum = int(input("Guess the number:")) print("You got it!")