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

Combining loops and conditions

תצוגה מקדימה

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

Combining loops and conditions

A line-following robot must keep checking its light sensor for as long as the program runs. If the sensor sees black, it moves forward; otherwise, it turns right to find the line again. Which combination of structures best describes this program?

  1. An if statement placed outside any loop

  2. A single for loop without any conditions

  3. A while loop containing an if-else statement

  4. Two separate functions with no repetition


The robot must repeat its checking over time, and it must choose between two actions at each check.

פרטים

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

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

תגובות

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