发布时间:2019-09-07 08:12:42编辑:auto阅读(3491)
输入一个测验成绩评定A-F
A:90-100
B:80-89
C:70-79
D:60-69
F:<60
#!/usr/bin/env python
score = int(raw_input('Please enter a score:'))
def print_score(g):
print "your score is %s " % g
if 90 < score <= 100:
print_score('A')
elif score > 80:
print_score('B')
elif score > 70:
print_score('C')
elif score > 60:
print_score('D')
else:
print_score('F')
上一篇: Python包和__init__.py文
下一篇: Python学习之PyYaml模块
53642
40471
34893
30615
25490
25269
23704
19146
15275
14787
1304°
1209°
1294°
1319°
1340°
1514°
1465°
1402°
1502°
1455°