Python学习day01

2019-01-15 07:04:33来源:博客园 阅读 ()

新老客户大回馈,云服务器低至5折

age = 23
count=0
while count<3:

    guess_age = int (input("My age:"))
    if age ==guess_age:
        print("nice, you got it")
        break
    elif age < guess_age:
        print("guess bigger!think smaller.")
    else:
        print("guess smaller,think bigger.")
    count=count+1
    if count==3:
        keep=input("\ndo you want to keeping guess?if no,input a n.")
        if keep!="n":
            count=0
print("bey bey!")
View Code
age = 23
count=0
while count<3:

    guess_age = int (input("My age:"))
    if age ==guess_age:
        print("nice, you got it")
        break
    elif age < guess_age:
        print("guess bigger!think smaller.")
    else:
        print("guess smaller,think bigger.")
    count=count+1
    if count==3:
        keep=input("\ndo you want to keeping guess?if no,input a n.")
        if keep!="n":
            count=0
print("bey bey!")

https://blog.csdn.net/PythonEnding/article/details/86325351

2019-01-12 00:08:08

 


原文链接:https://www.cnblogs.com/zwnsyw/p/10258299.html
如有疑问请与原作者联系

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:OpenCV中图像的BGR格式及Img对象的属性说明

下一篇:这五本Python急速入门必读的书,送给正在学习Python的你!