猜数小游戏

count=0
number=50
while count<3:
a=int(input("please send keys a math:\n"))
if a<number:
print("too sale")
elif a>number:
print("too bigger")
elif a==number:
print("good")
break
count+=1
if count==3:
b=str(input("你的机会已用完,是否继续猜数,继续猜数输入y,退出猜数请输入任意数字:\n"))
if b=='y':
count=0
else:
print("good bye")
break
posted @ 2018-04-05 21:16  wan了个蛋  阅读(122)  评论(0编辑  收藏  举报