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

Why use a loop

תצוגה מקדימה

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

Why use a loop

A student wants the robot to drive around a square. Instead of writing four separate 'move forward 20 cm' and 'turn right 90 degrees' pairs, the student uses a loop that repeats them 4 times. What is the main benefit of this approach?

  1. The robot can drive in a circle without any turning

  2. The program is shorter and easier to change or correct

  3. The robot becomes faster than with separate commands

  4. The robot no longer needs sensors


Compare how much code is needed and how many places must be edited if the square's side length changes.

פרטים

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

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

תגובות

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