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 代碼
刪除
恢復自動保存:
?