grade = int(input('请输入成绩:'))
try:
if 90<=grade<=100:
print("您的等级为:A")
elif 80<=grade<=89:
print("您的等级为:B")
elif 70<=grade<=79:
print("您的等级为:C")
elif 60<=grade<=69:
print("您的等级为:D")
except ValueError as e:
print("input error")
P60-2输入百分制评级
最新推荐文章于 2024-08-23 15:54:50 发布