Skip to content
Technologies · Year 7

Active learning ideas

Iteration (Loops) in Algorithms

Active learning helps Year 7 students grasp iteration by making abstract loop concepts tangible. Through hands-on coding and collaboration, students see firsthand how loops reduce repetitive work and solve real problems efficiently, building both understanding and confidence in algorithm design.

ACARA Content DescriptionsAC9TDI8P02
20–45 minPairs → Whole Class4 activities

Activity 01

Experiential Learning30 min · Pairs

Pair Programming: Shape Repeater

Pairs take turns: one writes a 'for' loop to draw repeated shapes in a block-based tool like Scratch, the other tests and suggests improvements. Switch roles after 10 minutes. Share one successful pattern with the class.

Construct an algorithm using a loop to perform a repetitive task.

Facilitation TipDuring Pair Programming: Shape Repeater, circulate and ask each pair to explain their loop setup before they run the code, ensuring they connect the repetition count to the loop’s purpose.

What to look forPresent students with a pseudocode snippet that draws a square using a 'for' loop. Ask them to identify the number of repetitions and the shape being drawn. Then, provide a scenario like 'move forward until you hit a wall' and ask which loop type ('for' or 'while') would be best suited and why.

ApplyAnalyzeEvaluateSelf-AwarenessSelf-ManagementSocial Awareness
Generate Complete Lesson

Activity 02

Stations Rotation45 min · Small Groups

Stations Rotation: Loop Challenges

Set up stations with tasks: station 1 uses 'for' for countdowns, station 2 'while' for guessing games, station 3 compares both for efficiency. Groups rotate every 10 minutes, coding and timing manual vs looped versions.

Compare the efficiency of iterative solutions versus manual repetition.

Facilitation TipIn Station Rotation: Loop Challenges, set a timer for 8 minutes per station and provide a one-page reference guide with loop examples to reduce cognitive load for struggling students.

What to look forGive students two simple tasks: 1. 'Draw 5 stars in a row.' 2. 'Keep adding 1 to a score until it reaches 10.' Ask them to write down the type of loop (for or while) they would use for each task and one reason for their choice.

RememberUnderstandApplyAnalyzeSelf-ManagementRelationship Skills
Generate Complete Lesson

Activity 03

Experiential Learning25 min · Whole Class

Whole Class: Loop Debug Relay

Project buggy loop code on screen. Teams send one student at a time to fix errors in a shared editor, explaining changes aloud. Continue until the algorithm runs correctly for all test cases.

Analyze scenarios where a 'while' loop is more appropriate than a 'for' loop.

Facilitation TipFor Whole Class: Loop Debug Relay, assign roles like 'timer' and 'recorder' to keep all students engaged during the rapid debugging rounds.

What to look forPose the question: 'Imagine you are programming a traffic light. Would you use a 'for' loop or a 'while' loop to control the red, yellow, and green light sequence? Explain your reasoning, considering when the loop should stop.'

ApplyAnalyzeEvaluateSelf-AwarenessSelf-ManagementSocial Awareness
Generate Complete Lesson

Activity 04

Experiential Learning20 min · Individual

Individual: Personal Loop Project

Students design a 'while' loop for a personalized task, like a multiplier game that continues until correct. Test independently, then peer review one another's code for efficiency.

Construct an algorithm using a loop to perform a repetitive task.

What to look forPresent students with a pseudocode snippet that draws a square using a 'for' loop. Ask them to identify the number of repetitions and the shape being drawn. Then, provide a scenario like 'move forward until you hit a wall' and ask which loop type ('for' or 'while') would be best suited and why.

ApplyAnalyzeEvaluateSelf-AwarenessSelf-ManagementSocial Awareness
Generate Complete Lesson

A few notes on teaching this unit

Teach iteration by starting with concrete examples students can visualize, like drawing shapes or moving a character. Avoid abstract explanations of loop mechanics early on; instead, focus on outcomes and efficiency gains. Research shows that students grasp loops better when they see immediate visual feedback, so prioritize block-based or simple text-based environments before moving to complex syntax.

By the end of these activities, students will explain when to use 'for' or 'while' loops, debug infinite loop scenarios, and justify their loop choices with clear reasoning. They will demonstrate this through written pseudocode, code outputs, and discussion contributions.


Watch Out for These Misconceptions

  • During Pair Programming: Shape Repeater, watch for students assuming loops always run forever because they forget to set a repetition count or exit condition.

    Ask students to trace their loop step-by-step on paper, marking where the loop starts, how many times it repeats, and where it ends. Have them run the code and explain why the loop stops, reinforcing the role of the loop counter or condition.

  • During Station Rotation: Loop Challenges, watch for students treating 'for' and 'while' loops as interchangeable without considering the scenario’s repetition needs.

    Provide a timer-based challenge where students must choose the loop type before coding; if they pick incorrectly, the code won’t meet the task. Discuss why their choice works or fails, using the timer’s output as evidence.

  • During Whole Class: Loop Debug Relay, watch for students believing loops only work with numeric data, such as counters or sums.

    Include a challenge in the relay where students use loops to repeat non-numeric instructions, like changing colors or playing tones. After debugging, ask them to explain how the loop handled the data type and what visual or auditory feedback confirmed its success.


Methods used in this brief