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

Why a loop is helpful

תצוגה מקדימה

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

Why a loop is helpful

A program needs to make a robot blink its light 100 times. Which approach is the best choice in programming?

  1. Write the blink command once and put it in a loop that repeats 100 times

  2. Write the blink command once and delete it

  3. Write the blink command 100 times in a row

  4. Write the blink command once and hope the robot does it 100 times


Think about which choice keeps the code short and easy to change if you later need 50 blinks instead.

פרטים

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

מקצועות
שפות תכנות
קהל יעד
בית ספר יסודי · כיתות ב׳–ג׳
רמת קושי
2 מתוך 10
שפה
אנגלית
מי יכול לראות
כולם
הושלם על ידי AI
מה שמסומן בניצוץ נוסף על ידי AI.
נוצר באמצעות AI
Claude Haiku 5.5
נוצר
עודכן
לפני 4 ימים

תגובות

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