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

Coding Basics: Sequences and Loops

שאלות 10

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

  1. רב־ברירהשפות תכנותsequenceinstruction orderstep by step

    What is a sequence

    In simple coding, what does it mean when instructions run in a sequence?

    1. The instructions run only when the computer is turned off

    2. The instructions run one after another, in order from top to bottom

    3. The instructions run all at the same time

    4. The instructions run at random, one at a time


    Think about how you follow a recipe step by step.
  2. רב־ברירהשפות תכנותcommandsinstructionsbasic concepts

    Meaning of a command

    What is a command in a simple computer program?

    1. A mistake that stops the program

    2. A picture that appears on the screen

    3. A single instruction that tells the computer to do one action

    4. A list of all the variables in a program


    A command is like telling a robot exactly one thing to do, such as move forward.
  3. רב־ברירהשפות תכנותloop purposerepetitionefficient code

    Purpose of a loop

    Why do programmers use a loop?

    1. To delete the program from the computer

    2. To change the color of the keyboard

    3. To repeat a set of commands several times without writing them again

    4. To make the computer skip every command


    Imagine wanting a robot to clap five times without writing 'clap' five separate lines.
  4. רב־ברירהשפות תכנותrobot drawingcommand ordersquare shape

    Order matters

    A robot must draw a square. Which set of commands, in order, would correctly draw one?

    1. Turn right, turn right, turn right, turn right, move forward

    2. Move forward, move forward, move forward, move forward, move forward

    3. Turn right, move forward, move forward, turn right

    4. Move forward, turn right, move forward, turn right, move forward, turn right, move forward, turn right


    A square has four sides and four corners, so count the sides and the turns.
  5. רב־ברירהשפות תכנותloopsrepeat countrobot commands

    Repeat block count

    A program repeats the commands 'move forward' and 'turn right' inside a loop 4 times. How many times in total is 'move forward' carried out?

    1. 2

    2. 1

    3. 8

    4. 4


    Each time the loop runs, the move forward command runs once.
  6. רב־ברירהשפות תכנותorder of commandsprogram sequencecomputer instructions

    Changing the order

    What happens to the result of a program if you swap the order of two commands, such as 'turn left' and 'move forward'?

    1. The program automatically fixes itself

    2. The computer ignores the second command

    3. The result never changes, because order does not matter in coding

    4. The result can change, because the computer follows the new order


    Think about turning first and then walking versus walking first and then turning.
  7. רב־ברירהשפות תכנותloopsrepetitionalgorithm basics

    Loops and repetition

    Which of these is the best example of using a loop instead of writing repeated commands?

    1. Repeat 10 times: say hello

    2. Say hello once and then stop forever without ending

    3. Say hello, say hello, say hello, say hello, say hello, say hello, say hello, say hello, say hello, say hello

    4. Say hello and then say goodbye at random


    Look for the option that uses a short instruction telling the computer how many times to repeat.
  8. נכון / לא נכוןשפות תכנותcommand sequenceloopsprogram execution

    Order of instructions

    In a simple program, the computer carries out the commands one after another, from top to bottom, unless a loop tells it to repeat them.

    1. True

    2. False


    Think about how you read a page of a book: which line comes first, and what happens when a loop is not used?
  9. נכון / לא נכוןשפות תכנותloopsrepetitionprogram efficiency

    Repeating with a loop

    If a program needs to clap 5 times, a loop that repeats the command 'clap' 5 times is a shorter way to write it than writing 'clap' five separate times.

    1. True

    2. False


    Compare how many lines of code you need in each version of the program.
  10. נכון / לא נכוןשפות תכנותprogram executionalgorithm basicscommand sequence

    Commands in a sequence

    In a sequence of commands, the computer may skip a command and still produce the same result as when it follows every command in order.

    1. True

    2. False


    Consider what would happen to a robot that skips the step 'pick up the cup' before the step 'carry the cup'.

פרטים

A short quiz on giving a computer step-by-step instructions, including sequences, repeats and simple commands.
מקצועות
שפות תכנות
קהל יעד
בית ספר יסודי · כיתות א׳–ג׳
רמת קושי
2 מתוך 10
שפה
אנגלית
מי יכול לראות
כולם
הושלם על ידי AI
מה שמסומן בניצוץ נוסף על ידי AI.
נוצר באמצעות AI
Claude Haiku 5.5
נוצר

תגובות

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