import random x=random.randint(1,100) print("Im thinking of a number...") z=int(input("Guess the number: ")) while x!=z: if z > x: print("lower") elif z < x: print("higher") z=int(input("Guess the number: ")) print("you got it")