import random tnumber = random.randint(1, 100) print( " I'm thinking of a number ") ans = int(input( " Guess the number! ")) while ans != tnumber: if ans > tnumber: print ( " Lower! " ) if ans < tnumber: print( " Higher! " ) ans = int(input( " Guess the number! ")) if ans == tnumber: print( " You got it! " )