Skip to content
Computing · Year 7

Active learning ideas

Loops: Repetition and Efficiency

Active learning works for loops because repetition is a physical act students can see and count. When students move from writing many lines to condensing code into a loop, they grasp how repetition replaces redundancy. This hands-on shift makes the efficiency of loops concrete rather than abstract.

National Curriculum Attainment TargetsKS3: Computing - Programming and Development
20–35 minPairs → Whole Class4 activities

Activity 01

Problem-Based Learning25 min · Pairs

Pair Programming: Shape Refactor

Pairs draw a square by copying move and turn blocks four times, then replace with a repeat 4 loop. Extend to a star using repeat 5 with adjusted turns. Pairs time each method and note line count differences.

Explain how loops reduce the complexity of a script.

Facilitation TipDuring Pair Programming: Shape Refactor, circulate and ask each pair to count how many blocks they removed by using a loop, reinforcing the link between fewer blocks and efficiency.

What to look forProvide students with two short Scratch code snippets: one using many duplicated commands and another using a 'repeat' loop to achieve the same result. Ask students to write one sentence explaining which snippet is more efficient and why.

AnalyzeEvaluateCreateDecision-MakingSelf-ManagementRelationship Skills
Generate Complete Lesson

Activity 02

Problem-Based Learning35 min · Small Groups

Small Groups: Loop Comparison Relay

Groups receive starter code with repetitive animation. One student converts to repeat loop, passes to partner for forever loop version with sensing condition. Groups demo and vote on most efficient.

Compare the functionality of 'repeat' and 'forever' loops in Scratch.

Facilitation TipFor Loop Comparison Relay, set a visible timer so groups feel pressure to test stops quickly, reinforcing that forever loops need control conditions.

What to look forDisplay a Scratch project that draws a square using a 'repeat' loop. Ask students: 'How many times does the repeat loop run?' and 'What command would you change to draw a pentagon instead?'

AnalyzeEvaluateCreateDecision-MakingSelf-ManagementRelationship Skills
Generate Complete Lesson

Activity 03

Problem-Based Learning20 min · Whole Class

Whole Class: Pattern Prediction

Project a looped script for a spiral. Class predicts outcome before running, then modifies repeat count together. Follow with 5-minute individual tweaks and shares.

Design a program that uses a loop to draw a complex shape.

Facilitation TipIn Pattern Prediction, pause the class after the first prediction round to clarify how counting executions changes with different repeat values.

What to look forPose the question: 'Imagine you are creating a program that makes a sprite say 'Hello!' 100 times. Would you use a 'repeat' loop or a 'forever' loop? Explain your reasoning and what would happen if you chose the other type of loop.'

AnalyzeEvaluateCreateDecision-MakingSelf-ManagementRelationship Skills
Generate Complete Lesson

Activity 04

Problem-Based Learning30 min · Individual

Individual: Custom Loop Art

Students design a complex shape like a flower using nested repeat loops. Test, debug, and export screenshots to class drive for gallery walk.

Explain how loops reduce the complexity of a script.

What to look forProvide students with two short Scratch code snippets: one using many duplicated commands and another using a 'repeat' loop to achieve the same result. Ask students to write one sentence explaining which snippet is more efficient and why.

AnalyzeEvaluateCreateDecision-MakingSelf-ManagementRelationship Skills
Generate Complete Lesson

A few notes on teaching this unit

Start by modeling the jump from long sequences to concise loops on the board, counting steps aloud. Avoid letting students write loops without testing them immediately, as this can cement misconceptions about control. Research shows that physically counting loop iterations builds stronger mental models than abstract explanations alone.

Students will confidently convert repetitive code into loops and justify their choices. They will distinguish when to use repeat loops versus forever loops and explain control flow. You will see clear evidence of reduced block counts and improved project readability in their work.


Watch Out for These Misconceptions

  • During Pair Programming: Shape Refactor, watch for students who treat repeat loops like forever loops by omitting a fixed count.

    Direct students to adjust the repeat block’s number and count iterations aloud, asking, 'How many times did that run? What happens if you change it to 3?'.

  • During Loop Comparison Relay, some students may assume forever loops cannot be stopped.

    Have each group insert a sensing block that stops the loop when a key is pressed, then test it together to see the loop halt.

  • During Pattern Prediction, students might think all loops run the same way regardless of their block contents.

    Ask students to verbalize what changes inside the loop by pointing to the blocks, ensuring they connect the loop count to the action performed.


Methods used in this brief