🔄 Sequential & Loops
Master the fundamentals of writing and tracing sequential code and using loops to reduce repetition. Learn how commands execute in order, how loops control iteration, and when to use repeat structures to make code more efficient. Perfect for Grade 4 students beginning their coding journey! **What you'll learn:** - How sequential code executes commands one after another - How loops (for, while, repeat) reduce code repetition - How to trace code and predict loop outcomes - When loops are appropriate to use - How to write basic loop structures
Questions in this quiz
Answers hidden — play to find out.
- Question 1
Look at this sequence of commands: Move forward 5 steps, turn left, move forward 5 steps. What will happen if you run these commands?
- Question 2
A loop allows you to repeat a set of commands multiple times without writing them over and over again.
- Question 3
If you want to draw a square by moving forward and turning right 4 times, which approach is BEST?
- Question 4
What does this pseudocode do?
Repeat 3 times: Print "Hello" Print "World"
- Question 5
In a for loop with the code 'Repeat 5 times: Move forward 10 pixels', the loop will execute the move command a total of 5 times.
- Question 6
Which situation is MOST appropriate for using a loop?
- Question 7
Trace this code step by step. What is the final result?
Count = 0 Repeat 4 times: Count = Count + 1 Print Count
- Question 8
Sequential code means that commands run in the exact order they are written, one after another.
- Question 9
If you use a 'While' loop with the condition 'while count < 5', the loop will continue running as long as count is less than 5. How many times will it run if count starts at 1 and increases by 1 each time?
- Question 10
Look at this block-based code:
Forever: Move forward Turn right 90 degrees
What shape will be drawn?
- Question 11
Using a loop is always the only way to repeat code in programming.
- Question 12
What will this code print?
For i = 1 to 3: Print i
- Question 13
A repeat loop with count 10 will execute its commands 10 times.
- Question 14
Which code is more efficient: writing 'move forward' 10 times separately, or using a loop to repeat 'move forward' 10 times?
- Question 15
What does this pseudocode do?
Set color to red Repeat 5 times: Draw circle Set color to blue Set color to green
- Question 16
The order of commands in sequential code does not matter; they will always produce the same result.
- Question 17
If a loop counter starts at 0 and goes 'while counter < 3, increment counter by 1', which values does counter have during execution?