py_day1

{18/06/11}    持续猜年龄游戏

age_of_AndrewMa = 21

count = 0

while count < 3:

guess_age = int(intput("guess_age:")

if guess_age > age_of_AndrewMa:

     print("No You should think smaller!")

elif guess_age < age_of_AndrewMa:

     print("No You should think bigger!")

else:

    print(Yes You are right!congratulation!")

count +=1

if count == 3:
      countine_confirem = input("Do you want to keep guessing....?")

      if countine_confirem !='n':

         count = 0

猜你喜欢

转载自www.cnblogs.com/andrewMa97/p/9170506.html