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')
    

 

posted on 2018-05-21 10:10  你是不夜星空  阅读(363)  评论(0编辑  收藏  举报

导航