"""
多路分支:
if 条件1:
条件1成立时执行
elif 条件2:
条件2成立时执行
else:
上述面条件不成立时执行
"""
# 分数
score = 55
# 评级
if score >= 85:
print("A")
elif score >= 70:
print("B")
elif score >= 60:
print("C")
else:
print("D")
print("over")
python 分支结构 分支结构 if多路分支 学生成绩评分 ABCD档
阅读 74
2023-03-05
"""
多路分支:
if 条件1:
条件1成立时执行
elif 条件2:
条件2成立时执行
else:
上述面条件不成立时执行
"""
# 分数
score = 55
# 评级
if score >= 85:
print("A")
elif score >= 70:
print("B")
elif score >= 60:
print("C")
else:
print("D")
print("over")
相关推荐
精彩评论(0)