码迷,mamicode.com
首页 > 编程语言 > 详细

python猜数字小游戏

时间:2016-04-30 22:17:06      阅读:159      评论:0      收藏:0      [点我收藏+]

标签:

print("---------guess number--------")
temp = input("please input you number :")
guess = int(temp)
num = 1
number = int(num)
while (guess !=8) and (number != 3):
     temp = input("erro,please input you number :")
   if guess == 8: print("ok") else: if guess > 8: print("litter big") number = number + 1 else: if guess < 8: print("a litter") number = number + 1 print("game over!")

 

python猜数字小游戏

标签:

原文地址:http://www.cnblogs.com/changbo/p/5449544.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!