猜年龄及分数等级

猜年龄:
age_of_princal=85
guess_age=int(input(“请输入年龄:”))
if age_of_princal==guess_age:
print(“yes,you got it”)
elif guess_age>age_of_princal:
print(“should try samller..”)
else:
print(“try big..”)
<code>这里写图片描述</code>

分数等级:
score=int(input(“score:”))
if score>90:
print(“A”)
elif score>80:
print(“B”)
elif score>70:
print(“C”)
elif score>60:
print(“D”)
else:
print(“不及格”)
这里写图片描述

猜你喜欢

转载自blog.csdn.net/weixin_42999586/article/details/81951654
今日推荐