Day_6 · 条件判断:让程序做决定 #7
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
今日知识点
if 条件:/elif 条件:/else:(注意冒号和缩进)><>=<===!=int(input(...)):把键盘输入转成整数再比较先学(教程)
任务(后做)
新建
day6.py:15、20、70测试三种结果。>=90打印"优秀",>=60打印"及格",否则打印"不及格"。用
if / elif / else写完,测95、75、50三个分数。完成标准
elif和连续多个if的区别(试想:都用 if 会怎样?)提交方式:把
day6.py代码贴在当日工单评论里。参考解答(先做再看)
https://github.com/wyn-netizen/hello-daily-challenge
喵
6
。
day6完成
1
1
6
6
pyage=int(input("请输入年龄"))
if age<18:
print("未成年")
elif age<60:
print("允许访问")
else:
print("老年")
score=int(input("输入分数"))
if score>=90:
print("优秀")
elif score>=60:
print("及格")
else:
print("不及格")
1
。
Day_6 · 条件判断 if(15/20/70 三档 + 95/75/50 成绩评级)