Python 输入分数并评

类似于猜年龄,主要使用else if 函数。 

score=int(input('input a number'))
if 100>=score>= 90:
    print('A')
else:
    if 90>score>=80:
        print('B')
    else:
        if 80>score>=60:
            print('C')
        else:
            if score<60:
                print('D')
            else:
                print('wrong')
    
原文地址:https://www.cnblogs.com/spencersun/p/9065885.html