2018-03-02 00:09:06 +08:00
|
|
|
|
"""
|
|
|
|
|
百分制成绩转等级制成绩
|
2019-06-12 01:23:30 +08:00
|
|
|
|
90分以上,输出A
|
|
|
|
|
80分~89分,输出B
|
|
|
|
|
70分~79分,输出C
|
|
|
|
|
60分~69分,输出D
|
|
|
|
|
60分以下,输出E
|
2018-03-02 00:09:06 +08:00
|
|
|
|
|
|
|
|
|
Version: 0.1
|
|
|
|
|
Author: 骆昊
|
|
|
|
|
Date: 2018-02-28
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
score = float(input('请输入成绩: '))
|
|
|
|
|
if score >= 90:
|
2019-05-03 21:17:36 +08:00
|
|
|
|
grade = 'A'
|
2018-03-02 00:09:06 +08:00
|
|
|
|
elif score >= 80:
|
2019-05-03 21:17:36 +08:00
|
|
|
|
grade = 'B'
|
2018-03-02 00:09:06 +08:00
|
|
|
|
elif score >= 70:
|
2019-05-03 21:17:36 +08:00
|
|
|
|
grade = 'C'
|
2018-03-02 00:09:06 +08:00
|
|
|
|
elif score >= 60:
|
2019-05-03 21:17:36 +08:00
|
|
|
|
grade = 'D'
|
2018-03-02 00:09:06 +08:00
|
|
|
|
else:
|
2019-05-03 21:17:36 +08:00
|
|
|
|
grade = 'E'
|
2018-03-02 00:09:06 +08:00
|
|
|
|
print('对应的等级是:', grade)
|