Skip to content
Technologies · Foundation

Active learning ideas

Implementing Loops: For and While

Active learning through movement and collaboration helps young students grasp loops as real-world tools. When students physically repeat actions or design patterns, they connect abstract coding concepts to tangible experiences, making repetition and conditions visible and meaningful.

ACARA Content DescriptionsAC9TDIK02AC9TDIP03
20–35 minPairs → Whole Class4 activities

Activity 01

Experiential Learning25 min · Pairs

Pair Programming: Looping Dance

In pairs, students select a ScratchJr character and use a for loop to repeat three dance moves, like spin, jump, slide. Partners alternate coding and testing, then perform routines for the class. Discuss why the loop saves time.

Differentiate between 'for' and 'while' loops and their appropriate use cases.

Facilitation TipDuring Pair Programming: Looping Dance, circulate to ensure both partners take turns coding and explaining the loop blocks they use.

What to look forPresent students with two short code snippets, one using a 'for' loop and one using a 'while' loop, to achieve a similar repetitive outcome. Ask students to identify which loop is used in each snippet and explain why it is appropriate for that task.

ApplyAnalyzeEvaluateSelf-AwarenessSelf-ManagementSocial Awareness
Generate Complete Lesson

Activity 02

Experiential Learning35 min · Small Groups

Small Groups: Pattern Path

Groups create a path drawing with a for loop to repeat line segments five times in different colors. They test on the stage, adjust repeat counts, and combine paths into a class mural. Groups explain their loop choice.

Construct a program that effectively uses loops to repeat actions.

Facilitation TipIn Small Groups: Pattern Path, provide grid paper and colored markers so students can sketch their loop-driven patterns before coding.

What to look forProvide students with a scenario, such as 'Make a character clap its hands 5 times.' Ask them to write down which type of loop ('for' or 'while') they would use and one reason why. Then, ask them to describe the condition or counter they would use.

ApplyAnalyzeEvaluateSelf-AwarenessSelf-ManagementSocial Awareness
Generate Complete Lesson

Activity 03

Experiential Learning30 min · Whole Class

Whole Class: While Loop Maze

Project a simple maze; class suggests while loop blocks for a character to move until reaching cheese. Teacher codes live, pausing for votes on conditions. Students then recreate individually at devices.

Analyze the efficiency gains of using loops compared to repetitive code.

Facilitation TipFor Whole Class: While Loop Maze, invite students to test each other’s mazes and record how many steps it takes to reach the target, reinforcing condition-based stopping.

What to look forAsk students to think about a daily routine, like brushing their teeth. Facilitate a discussion on how a 'for' loop could represent brushing for a set time, or how a 'while' loop could represent continuing until their teeth feel clean. Prompt them to explain the difference in their own words.

ApplyAnalyzeEvaluateSelf-AwarenessSelf-ManagementSocial Awareness
Generate Complete Lesson

Activity 04

Experiential Learning20 min · Individual

Individual: Repeat Greeting

Each student builds a for loop to make a cat say hello and wave four times. Add a while loop variant that repeats until tapped. Share one program via class gallery.

Differentiate between 'for' and 'while' loops and their appropriate use cases.

Facilitation TipFor Individual: Repeat Greeting, ask students to swap projects and identify the loop type and its setup in their peer’s code.

What to look forPresent students with two short code snippets, one using a 'for' loop and one using a 'while' loop, to achieve a similar repetitive outcome. Ask students to identify which loop is used in each snippet and explain why it is appropriate for that task.

ApplyAnalyzeEvaluateSelf-AwarenessSelf-ManagementSocial Awareness
Generate Complete Lesson

A few notes on teaching this unit

Teach loops by starting with students’ lived experiences of repetition, like clapping or walking. Use unplugged sorting games to show that repetition has limits, then transition to block coding where loops replace long chains of blocks. Avoid rushing to abstract definitions; instead, let students observe how loops save time and reduce errors by reusing code. Research suggests young learners benefit from seeing loops as ‘shortcuts’ that automate known routines, so emphasize efficiency and clarity over complexity.

Students will confidently choose between 'for' and 'while' loops based on whether repetition has a fixed count or a changing condition. They will explain their loop selection using clear reasons and accurately set up conditions or counters in their programs.


Watch Out for These Misconceptions

  • During Pair Programming: Looping Dance, watch for students who assume all loops keep going without stopping.

    During the dance activity, pause the class after the first loop finishes. Ask students to predict when the loop will end and test their predictions by counting aloud the repetitions in the dance sequence.

  • During Small Groups: Pattern Path, watch for students who believe 'for' loops only work with numbers like 3 or 5.

    During pattern sketching, ask groups to use loop blocks for repeating shapes like circles or stars, noting that the loop counter handles the count automatically without needing to type numbers.

  • During Whole Class: While Loop Maze, watch for students who think loops are just copies of the same block repeated many times.

    Compare a while loop program with a manually repeated block version side-by-side on the board. Ask students to count the total blocks in each and discuss which version is easier to change or debug.


Methods used in this brief