Python学习day01
程序员文章站
2023-12-31 20:15:52
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