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
מחיקה
האם לשחזר את הנתונים שנשמרו באופן אוטומטי:
?