import random snum= random.randint( 1, 100) while True: qnum=int(input("Guess the number:")) if qnum > snum: print("Lower!") elif qnum< snum: print("higher!") if qnum==snum: print("you got it!") break