import random
i=int(random.randint(0,10))
k=3
while k<=3:
j=int(input("请输入猜测数字:"))
if j==i:
print("猜对了真聪明")
break
elif j>i:
print('猜测结果大了')
elif j<i:
print('猜测结果小了')
k=k-1
if k==0:
break
print("你还有{}次机会".format(k))
print("输入次超限游戏结束")