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))
【Python】成绩等级判断
最新推荐文章于 2023-10-31 18:03:19 发布
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))