#数字竞猜
import random
secret = random.randint(1,10)
#输入数字
print('猜数字游戏')
guess = -2
while guess !=secret:
a = input('请输入数字:')
guess = int(a)
if guess > secret:
print('输入的数字太大了!')
elif guess < secret :
print('输入的数字太小了!')
else:
print('猜对了!')
print('游戏结束')