Python 成绩等级判定
score=int(input("请输入学生成绩:"))
if 90<=score<=100:
grade="A"
elif 75<=score<=90:
grade="B"
elif 60<=score<=75:
grade="C"
elif score<60:
grade="D"
print("本次考试,等级为:",grade)
运行结果:
作者:泡泡ʕ ᵔᴥᵔ ʔ
score=int(input("请输入学生成绩:"))
if 90<=score<=100:
grade="A"
elif 75<=score<=90:
grade="B"
elif 60<=score<=75:
grade="C"
elif score<60:
grade="D"
print("本次考试,等级为:",grade)
运行结果:
作者:泡泡ʕ ᵔᴥᵔ ʔ