day03_13 多分支if语句及作业

猜年龄升级版

age_of_princal = 56

guess_age = int( input("请输入您猜测的年龄") )

if guess_age == age_of_princal:
    print("恭喜你,猜对啦!")
elif guess_age > age_of_princal:
    print("猜大啦!")
else:
    print("猜小啦")

elif升级版

score = int(input("score:"))

if score > 90:
    print("A")
elif score>80:
    print("B")
elif score>70:
    print("C")
elif score>50:
    print("D")
else:
    print("gun")

  

原文地址:https://www.cnblogs.com/darkalex001/p/7486193.html