九九乘法表
for i in range(1,10,1): #i表示行 j表示列
for j in range(0,i,1):#j列计数器 i <=i
print(j+1,"*",i ,"=",(i*(j+1)),end="\t")
print()
打印4行星星
for i in range(0,4,1): #i表示行,j表示列
for j in range(0,i+1,1):#j列计数器 i<=i
print("*" ,end="")
print()
任务3:
判断成绩的级别:
A级:80-100
B级:70-80
C级:60-70
D级:0-60
score = int(input("请输入你的成绩:"))
# A
if score>=80 and score<=100:
print("A级")
# B
elif score>=70 and score<80:
print("B级")
# C
elif score>=60 and score<70:
print("C级")
else:
print("D级")