【Python】成绩等级判断

score=eval(input("请输入成绩:\n"))
if score>=60:
    grade="D"
elif score>=70:
    grade="C"
elif score>=80:
    grade="B"
elif score>=90:
    grade="A"
else:grade="E"
print("输入的成绩属于级别{}".format(grade))
    

猜你喜欢

转载自www.cnblogs.com/HGNET/p/12179478.html