Skip to content
Exam 10 questions

Algorithms: Sequences and Loops

Questions 10

The answer key is shown to signed-in teachers.

  1. Multiple choiceComputers

    Order of instructions

    A robot must draw a square. Which order of block commands will make the robot draw a square correctly?

    1. Move forward, move forward, move forward, move forward, turn right, turn right, turn right, turn right

    2. Turn right, turn right, move forward, move forward, move forward, move forward, turn right, turn right

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

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


    Think about what the robot does after each side: it must move a side and then change direction before the next side.
  2. Multiple choiceComputers

    Purpose of a repeat block

    What is the main purpose of a 'repeat 4 times' block in block coding?

    1. To make the program start over from the beginning forever

    2. To run the blocks inside it a set number of times without copying them

    3. To change the color of the sprite

    4. To delete the blocks that come after it


    Imagine you want to clap three times. Would you need to write the clap block three times, or is there a shorter way?
  3. Multiple choiceComputers

    Counting loop steps

    A program contains the block 'repeat 5 times' with the blocks 'move 10 steps' and 'turn 90 degrees' inside. How many times will the 'move 10 steps' block run?

    1. 1

    2. 4

    3. 10

    4. 5


    Look at the number written on the repeat block and remember what it tells the computer to do.
  4. Multiple choiceComputers

    Sequence matters

    A character needs to pick up a ball and then throw it. Which sequence is correct?

    1. Throw the ball, then throw the ball again, then pick up the ball

    2. Throw the ball, then pick up the ball

    3. Pick up the ball, then throw the ball

    4. Pick up the ball and throw the ball at the same time, then pick it up


    You cannot throw something you do not yet hold. Which action has to happen first?
  5. Multiple choiceComputers

    Repeat until a condition

    A program uses a 'repeat until touching the wall' block. What happens when the sprite touches the wall?

    1. The repeat loop stops and the next block after the loop runs

    2. The loop starts again from the beginning

    3. The computer turns off

    4. The sprite is deleted and the program restarts


    The word 'until' tells you the loop keeps going only while something is not yet true.
  6. Multiple choiceComputers

    Loop with a forever block

    What does a 'forever' block do when it contains the block 'say Hello'?

    1. It removes the word Hello from the screen

    2. It says Hello again and again without stopping until the program is stopped

    3. It says Hello exactly ten times and then stops

    4. It says Hello once and then stops the program


    The word 'forever' describes how long the blocks inside will keep running.
  7. Multiple choiceComputers

    Debugging a sequence

    A student wants a sprite to walk to a flower and then wave. The student put the 'wave' block first and the 'walk to flower' block second. What is the best fix?

    1. Change the sprite's color

    2. Add a repeat block around the wave block only

    3. Delete the wave block

    4. Swap the two blocks so that walking comes first and waving comes second


    Read the program from top to bottom, as the computer does, and compare the order with what the student wanted.
  8. True / falseComputers

    Order of blocks

    In block coding, a program runs its blocks in the order they are placed, from top to bottom.

    1. True

    2. False


    Think about how you read a list from top to bottom and how a computer follows a list of instructions.
  9. True / falseComputers

    Repeating a movement

    A 'repeat' block lets you run the blocks placed inside it several times without having to copy them again.

    1. True

    2. False


    Consider why a programmer might prefer one block that repeats instructions over writing the same blocks many times.
  10. True / falseComputers

    Changing the order

    If you move the 'turn 90 degrees' block above the 'move 10 steps' block in a program, the sprite will always end up in exactly the same place as before.

    1. True

    2. False


    Picture what happens when a sprite turns first and then moves compared with moving first and then turning.

About

Simple questions on giving step-by-step instructions, repeating actions with loops and finding mistakes in short programs.
Subjects
Computers
Audience
Elementary School · Grades 2–3
Difficulty
3 out of 10
Language
English
Who can see it
Everyone
Written by AI
Claude Haiku 5.5
Created

Comments

  1. No comments yet.
© All Rights Reserved