1) Which Python keyword makes an if run only when every test is True? a) AND b) OR 2) Which Python keyword makes an if run only when either test is True? a) AND b) OR 3) Fill the blank so the test keeps a number inside 1-9: if value > 0 ___ value < 10: a) AND b) OR 4) Given num = 10, what would be the ouput? a) Inside b) Outside c) True d) False 5) Given num = 6, what would be the ouput? a) Inside b) Outside c) True d) False 6) Which line is a valid Python test using Boolean operators? a) if value > 0 and < 10: b) if value>0 and value < 10: c) if value > 0 < 10: d) if 0 > value < 10: 7) True OR False evaluates to… a) True b) False 8) True AND False evaluates to… a) True b) False 9) Given age = 14 - ticket =no - money =yes what would be the output a) Allowed b) Not Allowed c) allowed d) Not allowed 10) Given age = 15 - ticket =no - money =yes what would be the output a) Allowed b) Not Allowed c) allowed d) Not allowed 11) Given temp=24 what would be the output a) Extreme Weather b) Ideal Room Temp c) Medium d) Ideal room temp 12) Given temp=30 what would be the output a) Extreme Weather b) Ideal Room Temp c) Medium d) Ideal room temp 13) Given temp=0 what would be the output a) Extreme Weather b) Ideal Room Temp c) Medium d) Ideal room temp 14) Given age=12 and adult ==no what would be the output a) Ride not approved b) Ride approved c) False d) True 15) How could this program be improved? a) Use more IF statements b) Only ask "Are you with an adult (yes/no)? " if age is between 12 and 18 c) Display "Ride not approved" immediately if age is less than 12 d) All of these
0%
Python Boolean
共享
共享
共享
由
Thossain24
编辑内容
打印
嵌入
更多
作业
排行榜
显示更多
显示更少
此排行榜当前是私人享有。单击
,共享
使其公开。
资源所有者已禁用此排行榜。
此排行榜被禁用,因为您的选择与资源所有者不同。
还原选项
随堂测验
是一个开放式模板。它不会为排行榜生成分数。
需要登录
视觉风格
字体
需要订阅
选项
切换模板
显示所有
播放活动时将显示更多格式。
打开成绩
复制链接
QR 代码
删除
恢复自动保存:
?