day01_03 if语句

guess任性玩.py

# Author:Adminone

age_of_oldboy = 56

count = 0
while count <3:
    guess_age = int(input("guess age:") )
    if guess_age == age_of_oldboy :
        print("yes, you got it. ")
        break
    elif guess_age > age_of_oldboy:
        print("think smaller...")
    else:
        print("think bigger!")
    count +=1
    if count == 3:
        countine_confirm = input("do you want to keep guessing..? Y/N")
        if countine_confirm != 'N':
            count =0
else:
    print("you have tried too many times..fuck off")

原文地址:https://www.cnblogs.com/netflix/p/14854018.html