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

031003 while 循环 (3)

时间:2020-03-10 18:42:13      阅读:67      评论:0      收藏:0      [点我收藏+]

标签:soft   already   print   The   time   ESS   big   mil   break   

# EXAMPLE_NUM01
age_of_oldboy = 56

count = 0
while count < 3:
guess_age = int(input("guess age: "))
if guess_age == age_of_oldboy:
print("yes,you got it")
break
elif guess_age > age_of_oldboy:
print("guess the name smaller...")
else:
print("guess Bigger please..")
count += 1
else:
print("you have tried too many times already...")

031003 while 循环 (3)

标签:soft   already   print   The   time   ESS   big   mil   break   

原文地址:https://www.cnblogs.com/azxsdcv/p/12457726.html

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