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

Choosing the right loop

תצוגה מקדימה

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

Choosing the right loop

A robot should keep moving forward as long as its front sensor does not detect a wall, and it does not know in advance how many steps this will take. Which programming structure is most suitable?

  1. A function that is defined but never called

  2. An if-else statement with no loop

  3. A while loop that checks a condition

  4. A for loop that repeats a fixed number of times


Think about a repetition structure that depends on a condition that may change during the run, not on a known count.

פרטים

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

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

תגובות

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