The code looks like this, it's code for one of those exercises to practice. The exercise was to generate a number and then prompt the user to guess the randomly generated number:
import random
x = 0
a = random.randint(1,9)
b = input("User's guess of the number generated: ")
def turn():
x += 1
if b < a:
print("The number was too low.")
elif b == a:
print("You got the number right")
break
else:
print("The number was too high")
while x != 3:
turn()
quit()