1 age_of_oldboy = 56
 2 count = 0
 3 while count <3:
 4     guess_age = int(input("guess age:"))
 5     if guess_age == age_of_oldboy:
 6        print ("yes,you got it.")
 7        break
 8     elif guess_age > age_of_oldboy:
 9         print("think smaller...")
10     else:
11         print("think bigger!")
12         count +=1
13     if count == 3:
14         countine_confirm =input("do you want to keep guessing...?")
15         if countine_confirm !="n":
16             count =0

 
                    
            
                

相关文章:

  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2021-07-21
  • 2021-07-17
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-22
  • 2022-12-23
相关资源
相似解决方案