import random
x=random.randint(1,100)
print('-----猜数游戏-----')
guess=0
while guess!=x:
temp=input('猜数开始,请输入:')
guess=int(temp)
if guess > x:
print('大了')
if guess < x:
print('小了')
if guess==x:
print('猜数正确')
print('-----游戏结束-----')
posted on
2019-03-20 20:08岁月流风
阅读(295)
评论(0)
编辑收藏举报