import random
secret=random.randint(1,10)
temp=input(“猜一猜数字:”)
guess=int(temp)
while guess!=secret:
temp=input(“猜错了请重新输入吧:”)
guess=int(temp)
if guess==secret:
print(“小蛔虫”)
print(“猜对了,没有奖励”)
else:
if guess>8:
print(“大了大了”)
else:
print(“小了小了”)
print(“游戏结束”)
01——猜数字
最新推荐文章于 2021-02-24 16:16:26 发布