Skip to content
Coding · 1st Year

Active learning ideas

Control Structures: Iteration

Iteration, or looping, allows a program to repeat a set of instructions multiple times. This is a key tool for efficiency, as it prevents programmers from having to write the same code over and over. In the NCCA framework, mastering iteration is essential for creating complex and efficient programs.

NCCA Curriculum SpecificationsNCCA Coding Strand 2: 2.9NCCA Coding Strand 3: 3.4
20–45 minPairs → Whole Class3 activities

Activity 01

Simulation Game25 min · Whole Class

Simulation Game: The Human Loop

Give a student a 'loop card' (e.g., 'Repeat 5 times: Clap your hands'). The class observes how much easier it is to give one 'loop' instruction than to say 'Clap' five separate times. They then try a 'While' loop (e.g., 'Clap while I am standing up').

What is a loop in programming?
ApplyAnalyzeEvaluateCreateSocial AwarenessDecision-Making
Generate Complete Lesson

Activity 02

Inquiry Circle45 min · Small Groups

Inquiry Circle: Loop Art

Using a simple drawing tool or even paper and pencil, students must create a complex pattern (like a snowflake or a brick wall) by identifying the smallest repeating unit and 'looping' it. They share their 'loop logic' with the class.

When should we use a FOR loop versus a WHILE loop?
AnalyzeEvaluateCreateSelf-ManagementSelf-Awareness
Generate Complete Lesson

Activity 03

Think-Pair-Share20 min · Pairs

Think-Pair-Share: For vs. While

Pairs are given different scenarios (e.g., 'Brushing 32 teeth' vs. 'Running until you are tired'). They must decide if a FOR loop or a WHILE loop is better for each and explain why to another pair.

How does iteration improve efficiency?
UnderstandApplyAnalyzeSelf-AwarenessRelationship Skills
Generate Complete Lesson

A few notes on teaching this unit


Watch Out for These Misconceptions

  • Loops go on forever.

    While 'infinite loops' can happen by mistake, most loops have a clear 'exit condition'. Using a 'stopwatch' activity where students loop until a timer hits zero helps them understand how loops are controlled.

  • You only use loops for big tasks.

    Even repeating a task twice is more efficient with a loop if you might want to change it to ten times later. Peer discussions about 'future-proofing' code help students see the value of loops even for small repetitions.


Methods used in this brief