Loops Excercise
Loops Excercise
2. Which block would you use if you want a sprite to perform an action continuously until a certain
condition is met?
A) "Repeat [ ] times"
B) "Forever"
C) "Repeat Until"
D) "Wait [ ] seconds"
3. How does the "Forever" block differ from the "Repeat [ ] times" block?
A) The "Forever" block repeats indefinitely, while the "Repeat [ ] times" block stops after a specific
number of repetitions.
B) The "Forever" block only works with numerical inputs, while the "Repeat [ ] times" block uses text
inputs.
C) The "Forever" block repeats a specific number of times, while the "Repeat [ ] times" block repeats
indefinitely.
D) The "Forever" block waits for a condition, while the "Repeat [ ] times" block does not.
Answer: A) The "Forever" block repeats indefinitely, while the "Repeat [ ] times" block stops after a
specific number of repetitions.
4. What happens if the condition in the "Repeat Until" block is never met?
B) The sprite will repeat the instructions inside the block indefinitely.
C) The sprite will execute the instructions inside the block once and stop.
Answer: B) The sprite will repeat the instructions inside the block indefinitely.
5. Which block is best for making a sprite change color every second?
A) "Repeat [ ] times"
B) "Forever"
C) "Repeat Until"
D) "Wait [ ] seconds"
Answer: B) "Forever"
6. If you want to make a sprite move 10 steps forward and then turn around, and you want this
action to happen 6 times, which block would you use?
A) "Forever"
C) "Repeat Until"
D) "Wait [ ] seconds"
7. To ensure a sprite keeps moving until it touches the edge of the screen, which block should be
used?
A) "Repeat [ ] times"
B) "Forever"
C) "Repeat Until"
D) "Wait [ ] seconds"
8. Which loop block is ideal for creating a continuous animation that should keep running until the
program stops?
A) "Repeat [ ] times"
B) "Forever"
C) "Repeat Until"
D) "Wait [ ] seconds"
Answer: B) "Forever"
9. What type of loop should you use to make a sprite say "Hello" 5 times, with a pause between each
"Hello"?
A) "Forever"
C) "Repeat Until"
D) "Wait [ ] seconds"
10. How can you make a sprite keep performing actions like moving and changing costumes until it
hits a specific color?
C) Use a "Repeat Until" block with the condition set to "touching color [ ]?"
Answer: C) Use a "Repeat Until" block with the condition set to "touching color [ ]?"
1. The "________" block repeats the actions inside it a specific number of times and then stops.
2. To make a sprite continue performing actions until a certain condition is met, you would use the
"________" block.
3. The "________" block causes a sprite to perform actions continuously without ever stopping,
unless you manually stop the program.
Answer: Forever
4. If you want a sprite to move 10 steps forward and then turn 15 degrees, repeating this sequence 8
times, you should use the "________" block.
5. To make a sprite move across the stage until it touches the edge and then change direction, use
the "________" block with the condition set to "touching edge?".
Answer: Forever
7. To make a sprite perform a series of actions a fixed number of times and then stop, use the
"________" block with the desired number of repetitions.
8. If you need to repeat an action until the sprite touches a specific color, you should use the
"________" block and set the condition to "touching color [ ]?".
9. To continuously animate a sprite by changing its costume every 2 seconds, use the "________"
block and place the "change costume" and "wait [2] seconds" blocks inside it.
Answer: Forever
10. If you want a sprite to perform an action 5 times and then wait for 2 seconds before performing
the action again, use a combination of the "________" block and "wait [2] seconds".