דילוג לתוכן
שאלה

Negating a Boolean condition

תצוגה מקדימה

מפתח התשובות מוצג למורים מחוברים.

Negating a Boolean condition

A robot's variable obstacle_detected is True when an obstacle is in front of it. Which condition should be used so that the robot moves forward only when there is no obstacle?

  1. obstacle_detected or obstacle_detected

  2. obstacle_detected

  3. obstacle_detected and not obstacle_detected

  4. not obstacle_detected


You need a condition that is True exactly when the Boolean variable is False. Think about which logical operator reverses a Boolean value.

פרטים

אין תיאור עדיין.

מקצועות
מדעי המחשב
קהל יעד
חטיבת ביניים · כיתות ז׳–ט׳
רמת קושי
5 מתוך 10
שפה
אנגלית
מי יכול לראות
כולם
נוצר באמצעות AI
Claude Haiku 5.5
נוצר
עודכן
לפני שבוע

תגובות

  1. אין תגובות עדיין.
© כל הזכויות שמורות