首页 > 其他 > 详细

任性玩 while

时间:2019-05-18 01:04:14      阅读:128      评论:0      收藏:0      [点我收藏+]
age_of_me = 17

count = 0
while count < 5:
    guess_age = int(input("guess age:"))
    if guess_age == age_of_me :
        print("yes,you get it.")
        break
    elif guess_age > age_of_me:
        print("guess smaller")
    else:
        print("guess bigger")
    count +=1
    if count == 5:
        countine_confirm = input("do you want go on:")
        if countine_confirm != n:
            count = 0

 

任性玩 while

原文:https://www.cnblogs.com/0815tang/p/10884304.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!