Skip to content

Loops: Repetition and EfficiencyActivities & Teaching Strategies

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.

Year 7Computing4 activities20 min35 min

Learning Objectives

  1. 1Compare the functionality of 'repeat' and 'forever' loops in Scratch.
  2. 2Explain how loops reduce the complexity and increase the efficiency of a script.
  3. 3Design a Scratch program that utilizes a loop to draw a geometric shape.
  4. 4Identify the specific number of repetitions required for a 'repeat' loop to complete a given task.
  5. 5Analyze a given script to determine if a 'repeat' or 'forever' loop is more appropriate.

Want a complete lesson plan with these objectives? Generate a Mission

25 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.

Prepare & details

Explain how loops reduce the complexity of a script.

Facilitation Tip: During 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.

Setup: Groups at tables with access to research materials

Materials: Problem scenario document, KWL chart or inquiry framework, Resource library, Solution presentation template

AnalyzeEvaluateCreateDecision-MakingSelf-ManagementRelationship Skills
35 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.

Prepare & details

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

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

Setup: Groups at tables with access to research materials

Materials: Problem scenario document, KWL chart or inquiry framework, Resource library, Solution presentation template

AnalyzeEvaluateCreateDecision-MakingSelf-ManagementRelationship Skills
20 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.

Prepare & details

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

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

Setup: Groups at tables with access to research materials

Materials: Problem scenario document, KWL chart or inquiry framework, Resource library, Solution presentation template

AnalyzeEvaluateCreateDecision-MakingSelf-ManagementRelationship Skills
30 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.

Prepare & details

Explain how loops reduce the complexity of a script.

Setup: Groups at tables with access to research materials

Materials: Problem scenario document, KWL chart or inquiry framework, Resource library, Solution presentation template

AnalyzeEvaluateCreateDecision-MakingSelf-ManagementRelationship Skills

Teaching This Topic

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.

What to Expect

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.

These activities are a starting point. A full mission is the experience.

  • Complete facilitation script with teacher dialogue
  • Printable student materials, ready for class
  • Differentiation strategies for every learner
Generate a Mission

Watch Out for These Misconceptions

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

What to Teach Instead

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?'.

Common MisconceptionDuring Loop Comparison Relay, some students may assume forever loops cannot be stopped.

What to Teach Instead

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.

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

What to Teach Instead

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

Assessment Ideas

Exit Ticket

After Pair Programming: Shape Refactor, provide two snippets: one with duplicated blocks and one with a repeat loop. Ask students to circle the more efficient version and write one sentence explaining their choice based on block count.

Quick Check

During Loop Comparison Relay, display a sample project and ask, 'How do you stop this forever loop? What block would you add?' Observe groups as they insert and test their answers.

Discussion Prompt

After Custom Loop Art, pose the scenario: 'Your sprite moves 20 steps forward, turns 18 degrees, and repeats. Would a repeat or forever loop suit this task? Why? What could go wrong with the other choice?' Listen for reasoning about fixed versus continuous repetition.

Extensions & Scaffolding

  • Challenge students who finish early to add a sensor that stops a forever loop when a condition is met.
  • For students who struggle, provide partially written scripts with missing loop blocks to complete.
  • Deeper exploration: Invite students to research and present how nested loops work in Scratch, comparing visual outcomes and execution order.

Key Vocabulary

LoopA control flow statement that allows code to be executed repeatedly. Loops are used to automate repetitive tasks.
Repeat loopA loop that executes a block of code a specific, predetermined number of times. It stops once the set count is reached.
Forever loopA loop that executes a block of code continuously until the program is stopped or a specific condition is met to break out of the loop.
IterationOne complete execution of the block of code within a loop. A 'repeat' loop with a count of 5 will perform 5 iterations.

Ready to teach Loops: Repetition and Efficiency?

Generate a full mission with everything you need

Generate a Mission