import random
age = random.randint(10,25)
count = 0
while count 3:
n = int(input('Guess the age:'))
if n > age:
print('Try smaller,你还有%s次机会'%(2-count))
count += 1
elif n < age:
print('Try bigger,你还有%s次机会'%(2 - count))
count += 1
else:
print('Yes,you get it')
break
print(age)