python入门


'''
score = int(input("输入成绩:"))
if score >=90 and score <=100 :
    print("A")
elif score >=80 and score < 90 :
    print("B")
elif score >=70 and score < 80 :
    print("C")
elif score >=60 and score < 70 :
    print("D")
else :
    print("E")
'''

'''
score = int(input("输入成绩:"))
if score >= 90 and score <= 100 :
    print("此次考试等级为A")
else:
    if score >= 80 and score < 90 :
        print("此次考试等级为B")
    else:
        if score >= 70 and score < 80 :
            print("此次考试等级为C")
        else:
            if score >= 60 and score < 70:
                print("此次考试等级为D")
            else:
                print("此次考试等级为E")
'''

import random               #引入库
num = random.randint(0,2)   #[0,2]的随机数
print(num)

相关