Python学习day01
程序员文章站
2022-03-25 18:53:13
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("gu ......
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!")
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
上一篇: 菜鸟记