码迷,mamicode.com
首页 > 其他好文 > 详细

while循环

时间:2017-11-13 16:37:51      阅读:130      评论:0      收藏:0      [点我收藏+]

标签:time   think   put   nbsp   mes   guess   style   man   code   

# Author:liuzhongchang
LIU_age = 27
count=0
while count<3:
    guess_age = int(input("guess age:"))
    if guess_age==LIU_age:
     print("yes,you got it.")
     break
    elif guess_age>LIU_age:
     print("think smaller...")
    else:
     print("think bigger...")
    count+=1
else:
    print("you have tried too many times..fuck off..")

 

while循环

标签:time   think   put   nbsp   mes   guess   style   man   code   

原文地址:http://www.cnblogs.com/liuzhongchang/p/7826327.html

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