)ifscore>=90:grade='A'elifscore>=80:grade='B'elifscore>=70:grade='C'elifscore>=60:grade='D'else:grade='E'print('对应的等级是:',grade)if__name__=='__main__':main()2、也可以将五分制构造出一个字符串'EEEEEEDCBAA',用以下方法实现这个功能:
score=int(input())degree='EEEEEEDCBAA'if(score>100orscore<0):print('Dataerror!'
)else:print(degree[score//10])