猜随机数字
import random
y = random.randint(1,10)
print('猜数字游戏')
z = input('输入数字')
guess = int(z)
if guess > y:
print('大了')
else:
print('小了')
while guess != y:
z = input('重新输入数字')
guess = int(z)
if guess == y:
print('对了')
else:
if guess > y:
print('大了')
else:
print('小了')
print('游戏结束')