דילוג לתוכן
מבחן 10 שאלות

Robot Programming Basics

שאלות 10

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

  1. רב־ברירהמדעי המחשבשפות תכנותmovement commandsrobot instructionsprogramming termsforward commandbasic syntax

    Basic Movement Commands

    A robot is programmed to execute the command forward(10), which moves it 10 centimeters ahead. Which term best describes this instruction?

    1. A command

    2. A variable

    3. A condition

    4. A loop


    Think about instructions that tell the robot to perform a specific action right now.
  2. רב־ברירהמדעי המחשבשפות תכנותloopsrepetitionrobot programmingprogramming constructscode efficiency

    Repeating Actions with a Loop

    A programmer wants a robot to draw a square by moving forward and turning 90 degrees four times. Which programming construct avoids writing the same two instructions four times?

    1. A conditional statement

    2. A loop

    3. A sensor reading

    4. A comment


    Look for a structure that runs a block of instructions a set number of times.
  3. רב־ברירהמדעי המחשבשפות תכנותif-else statementconditional logicdistance sensorrobot programmingdecision making

    Making Decisions with Conditions

    A robot should stop when its distance sensor detects an obstacle closer than 5 cm, and otherwise keep moving. Which construct allows the robot to choose between these two behaviours?

    1. A variable declaration

    2. A repeat loop without a stop

    3. A single forward command

    4. A condition (if-else statement)


    The robot must check something and pick one of two paths depending on the result.
  4. רב־ברירהמדעי המחשבloop typesconditional loopline sensor

    Loops and Conditions Together

    A robot repeats the instruction 'move forward' inside a loop, and within each repetition checks whether the line sensor sees black. The loop should stop when the robot reaches the black line. Which loop type is most suitable for this task?

    1. A loop that runs a fixed 10 times

    2. A loop that runs only once

    3. A loop that repeats until a condition becomes true

    4. A loop with no commands inside


    The number of repetitions is not known in advance; it depends on what the sensor detects.
  5. נכון / לא נכוןמדעי המחשבif-else statementbranchingrobot program

    Conditions in robot control

    A robot program that uses an if-else statement will always execute both the 'if' branch and the 'else' branch during a single run.

    1. True

    2. False


    Think about what happens when the condition is true versus when it is false, and whether both can happen at the same moment.
  6. נכון / לא נכוןמדעי המחשבrepetitionrobot programfixed loops

    Loops and repeated actions

    A loop that repeats the commands inside it a fixed number of times is a useful way to avoid writing the same instructions over and over again in a robot program.

    1. True

    2. False


    Consider why a programmer would prefer a single loop over copying the same command many times.
  7. השלמהמדעי המחשבtrue falserobot programboolean conditions

    Conditions in robot programs

    A condition in a robot program is an expression that is either ______ or false.

    runningmovingtruelargeempty

    Think about the two possible results a yes/no test can produce in a program.
  8. השלמהמדעי המחשבinfinite looploop terminationloopsrobot program

    Endless loops

    A loop that has no way to end runs forever and is called an ___________ loop. If a robot program contains such a loop, the robot will keep ___________ its commands until it is turned off.

    countedrepeatingskippingstoringsingleinfinitenested

    Consider what a loop does when its repetition never stops, and what that kind of loop is named.
  9. שאלה פתוחהמדעי המחשבrepeat commandprogram structurecounted looploop bodyrobot path

    Sequence of Commands with a Repeat

    A robot must follow a path that goes forward 20 cm and then turns right 90 degrees, and this pattern must be done exactly 3 times to form a triangle-like route. Explain how a loop can be used to write this program instead of repeating the same instructions three times, and name the parts of the loop you would write.


    Think about a construct that runs the same block of commands a set number of times, and what goes inside its body.
  10. שאלה פתוחהמדעי המחשבwhile looploop terminationline followingconditionssensor condition

    Condition Checked in a Loop

    A robot moves along a line and, in each step, checks a light sensor. Describe how a while loop with a condition can keep the robot moving until it reaches a black line, and explain what happens to the loop once the condition becomes false.


    Focus on when the loop repeats and when it stops, based on whether the condition is true or false at each check.

פרטים

Questions on robot instructions, loops and conditions, and writing simple movement commands for a robot.
קהל יעד
חטיבת ביניים · כיתות ח׳–ט׳
רמת קושי
5 מתוך 10
שפה
אנגלית
מי יכול לראות
כולם
הושלם על ידי AI
מה שמסומן בניצוץ נוסף על ידי AI.
נוצר באמצעות AI
Claude Haiku 5.5
נוצר

תגובות

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