Learning objective
Loops & Repetition
Loops & Repetition
Understanding count-controlled loops, infinite loops, repeat-until loops, and nested repetition structures across unplugged, visual block, and text-based coding.
Y1 โ Physical Repetition
Identify repeating patterns in everyday actions and physical routines.
Let's Go!
Learn
A loop is an instruction that tells us to repeat an action. Instead of saying 'clap, clap, clap', we can say 'repeat 3 times: clap'. This makes instructions shorter and easier to follow!
Try it yourself
Create a Physical Loop Routine
๐ Open a practice space
Or try locally: ๐ Raspberry Pi Projects
๐ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)
๐ฏ Task Success Criteria (Rubric)
Recognise when an action is repeated.
Count how many times an action repeats in a simple dance or clapping pattern.
Identify repeating loops in physical routines and state the repeat count.
Create original physical repetition routines and explain why repeating beats saves instruction steps.
๐ What A Good One Looks Like (WAGOLL)
A top-tier student project for Y1 โ Physical Repetition includes:
- Core Deliverable: Create a Physical Loop Routine
- Target Quality: Identify repeating loops in physical routines and state the repeat count.
- Excellence & Polish: Create original physical repetition routines and explain why repeating beats saves instruction steps.
When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!
Reflect
Learning check
Teacher setup, curriculum links and progress descriptors
Spark support
Routine: Think-Pair-Share
Achievement pathway
- Foundation: Recognise when an action is repeated.
- Developing: Count how many times an action repeats in a simple dance or clapping pattern.
- Secure: Identify repeating loops in physical routines and state the repeat count.
- Mastering: Create original physical repetition routines and explain why repeating beats saves instruction steps.
Curriculum links
Curriculum strand: coding/loops-repetition
Outcome: AP.01.B.1.1 โ Identify repeating patterns in everyday actions and physical routines.
PYP: Form ยท Repeating actions allow humans and machines to perform routines efficiently.
Learner profile: Inquirer
Competency tags
Gate support
Accessibility alternative:
Teacher override: allow
Locked level
Level 2: Y2 โ Count-Controlled Loops
Complete the previous learning check to unlock this next level.
Y2 โ Count-Controlled Loops
Use repeat blocks with fixed counts in visual block programs.
Learning objective
Program a sprite to execute actions using a count-controlled repeat block.
Let's Go!
Learn
In block coding, a 'repeat [N]' block wraps around other blocks like a sandwich. Any blocks inside the repeat loop will execute N times before moving to the next block below.
Try it yourself
Program a Square Walk Pattern
๐ Open a practice space
Or try locally: ๐ Raspberry Pi Projects
๐ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)
๐ฏ Task Success Criteria (Rubric)
Place a repeat block around a single movement block.
Set a repeat count number to move a sprite across a grid.
Use count-controlled repeat loops to draw regular geometric shapes or repeat multi-block movement scripts.
Compare a script written with loops to one written linearly without loops, explaining code efficiency.
๐ What A Good One Looks Like (WAGOLL)
A top-tier student project for Y2 โ Count-Controlled Loops includes:
- Core Deliverable: Program a Square Walk Pattern
- Target Quality: Use count-controlled repeat loops to draw regular geometric shapes or repeat multi-block movement scripts.
- Excellence & Polish: Compare a script written with loops to one written linearly without loops, explaining code efficiency.
When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!
Reflect
Learning check
Teacher setup, curriculum links and progress descriptors
Spark support
Routine: Think-Pair-Share
Achievement pathway
- Foundation: Place a repeat block around a single movement block.
- Developing: Set a repeat count number to move a sprite across a grid.
- Secure: Use count-controlled repeat loops to draw regular geometric shapes or repeat multi-block movement scripts.
- Mastering: Compare a script written with loops to one written linearly without loops, explaining code efficiency.
Curriculum links
Curriculum strand: coding/loops-repetition
Outcome: AP.01.B.1.1 โ Use repeat blocks with fixed counts in visual block programs.
PYP: Function ยท Count-controlled loops execute precise repetitions in digital algorithms.
Learner profile: Communicator
Competency tags
Gate support
Accessibility alternative:
Teacher override: allow
Locked level
Level 3: Y3 โ Forever & Infinite Loops
Complete the previous learning check to unlock this next level.
Y3 โ Forever & Infinite Loops
Construct infinite repetition loops for continuous background animations and game monitoring.
Learning objective
Utilize 'forever' loops to maintain continuous sprite animations and ongoing condition checking.
Let's Go!
Learn
A 'forever' loop runs continuously until the program is stopped manually. It is used for ongoing tasks like costume animations, background scrolling, or constantly checking if a key is pressed.
Try it yourself
Animate a Flying Bird Sprite
๐ Open a practice space
Or try locally: ๐ Raspberry Pi Projects
๐ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)
๐ฏ Task Success Criteria (Rubric)
Identify a forever block in the block palette.
Wrap a costume-switching script inside a forever loop to create walking animations.
Construct forever loops that continuously monitor game conditions or animate backgrounds.
Explain when to use a forever loop versus a count-controlled loop in game design.
๐ What A Good One Looks Like (WAGOLL)
A top-tier student project for Y3 โ Forever & Infinite Loops includes:
- Core Deliverable: Animate a Flying Bird Sprite
- Target Quality: Construct forever loops that continuously monitor game conditions or animate backgrounds.
- Excellence & Polish: Explain when to use a forever loop versus a count-controlled loop in game design.
When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!
Reflect
Learning check
Teacher setup, curriculum links and progress descriptors
Spark support
Routine: Think-Pair-Share
Achievement pathway
- Foundation: Identify a forever block in the block palette.
- Developing: Wrap a costume-switching script inside a forever loop to create walking animations.
- Secure: Construct forever loops that continuously monitor game conditions or animate backgrounds.
- Mastering: Explain when to use a forever loop versus a count-controlled loop in game design.
Curriculum links
Curriculum strand: coding/loops-repetition
Outcome: AP.02.B.1.1 โ Construct infinite repetition loops for continuous background animations and game monitoring.
PYP: Change ยท Infinite loops allow programs to run background tasks continuously.
Learner profile: Thinker
Competency tags
Gate support
Accessibility alternative:
Teacher override: allow
Locked level
Level 4: Y4 โ Repeat Until Conditionals
Complete the previous learning check to unlock this next level.
Y4 โ Repeat Until Conditionals
Implement conditional loops that repeat actions until a specific sensing condition is met.
Learning objective
Build scripts using 'repeat until' loops governed by touch or sensing conditions.
Let's Go!
Learn
A 'repeat until [condition]' loop evaluates its condition before every iteration. It repeats the enclosed actions continuously until the condition evaluates to true, then stops looping and moves to the next block.
Try it yourself
Program an Obstacle-Stopping Vehicle
๐ Open a practice space
Or try locally: ๐ Raspberry Pi Projects
๐ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)
๐ฏ Task Success Criteria (Rubric)
Identify the sensing condition slot in a repeat-until block.
Combine a touching-color or touching-mouse sensor with a repeat-until loop.
Program game sprites to move continuously until hitting an obstacle or reaching a target.
Debug scripts where repeat-until conditions never become true (preventing infinite hanging).
๐ What A Good One Looks Like (WAGOLL)
A top-tier student project for Y4 โ Repeat Until Conditionals includes:
- Core Deliverable: Program an Obstacle-Stopping Vehicle
- Target Quality: Program game sprites to move continuously until hitting an obstacle or reaching a target.
- Excellence & Polish: Debug scripts where repeat-until conditions never become true (preventing infinite hanging).
When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!
Reflect
Learning check
Teacher setup, curriculum links and progress descriptors
Spark support
Routine: Think-Pair-Share
Achievement pathway
- Foundation: Identify the sensing condition slot in a repeat-until block.
- Developing: Combine a touching-color or touching-mouse sensor with a repeat-until loop.
- Secure: Program game sprites to move continuously until hitting an obstacle or reaching a target.
- Mastering: Debug scripts where repeat-until conditions never become true (preventing infinite hanging).
Curriculum links
Curriculum strand: coding/loops-repetition
Outcome: AP.02.B.1.1 โ Implement conditional loops that repeat actions until a specific sensing condition is met.
PYP: Connection ยท Conditional loops enable dynamic algorithmic responses based on real-time environmental data.
Learner profile: Principled
Competency tags
Gate support
Accessibility alternative:
Teacher override: allow
Locked level
Level 5: Y5 โ Nested Loops
Complete the previous learning check to unlock this next level.
Y5 โ Nested Loops
Place loops inside other loops to construct multi-dimensional grids, patterns, and nested iterations.
Learning objective
Design algorithms with nested loops to create 2D grid layouts and complex geometric patterns.
Let's Go!
Learn
Nested loops occur when one loop (the inner loop) is placed entirely inside another loop (the outer loop). For every single pass of the outer loop, the inner loop completes all of its iterations.
Try it yourself
Draw a Grid of Geometric Shapes
๐ Open a practice space
Or try locally: ๐ Raspberry Pi Projects
๐ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)
๐ฏ Task Success Criteria (Rubric)
Recognize an inner loop placed inside an outer loop.
Calculate the total number of iterations in a nested loop (outer count x inner count).
Use nested loops with pen blocks to draw complex tiled patterns or generate 2D grid coordinates.
Optimize nested loop algorithms to avoid performance lag in complex graphical applications.
๐ What A Good One Looks Like (WAGOLL)
A top-tier student project for Y5 โ Nested Loops includes:
- Core Deliverable: Draw a Grid of Geometric Shapes
- Target Quality: Use nested loops with pen blocks to draw complex tiled patterns or generate 2D grid coordinates.
- Excellence & Polish: Optimize nested loop algorithms to avoid performance lag in complex graphical applications.
When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!
Reflect
Learning check
Teacher setup, curriculum links and progress descriptors
Spark support
Routine: Think-Pair-Share
Achievement pathway
- Foundation: Recognize an inner loop placed inside an outer loop.
- Developing: Calculate the total number of iterations in a nested loop (outer count x inner count).
- Secure: Use nested loops with pen blocks to draw complex tiled patterns or generate 2D grid coordinates.
- Mastering: Optimize nested loop algorithms to avoid performance lag in complex graphical applications.
Curriculum links
Curriculum strand: coding/loops-repetition
Outcome: AP.03.B.1.1 โ Place loops inside other loops to construct multi-dimensional grids, patterns, and nested iterations.
PYP: Perspective ยท Nested loops enable the automated generation of complex multi-dimensional patterns and structures.
Learner profile: Knowledgeable
Competency tags
Gate support
Accessibility alternative:
Teacher override: allow
Locked level
Level 6: Y6 โ Loop Optimization & Text Loops
Complete the previous learning check to unlock this next level.
Y6 โ Loop Optimization & Text Loops
Transition loop concepts into text-based languages (for/while) and analyze computational loop efficiency.
Learning objective
Write text-based 'for' and 'while' loops in Python and analyze algorithmic loop complexity.
Let's Go!
Learn
In text coding like Python, `for i in range(10):` runs a loop a fixed number of times, while `while condition:` repeats as long as a condition remains True. Proper indentation defines the code inside the loop body.
Try it yourself
Build a Python Countdown Loop
๐ Open a practice space
Or try locally: ๐ Raspberry Pi Projects
๐ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)
๐ฏ Task Success Criteria (Rubric)
Identify 'for' and 'while' keywords in simple Python code.
Translate a block repeat loop into a Python `for i in range(N):` statement.
Construct text-based while loops with counter variables and condition updates.
Evaluate nested loop complexity O(n^2) and refactor inefficient loop structures to improve program execution speed.
๐ What A Good One Looks Like (WAGOLL)
A top-tier student project for Y6 โ Loop Optimization & Text Loops includes:
- Core Deliverable: Build a Python Countdown Loop
- Target Quality: Construct text-based while loops with counter variables and condition updates.
- Excellence & Polish: Evaluate nested loop complexity O(n^2) and refactor inefficient loop structures to improve program execution speed.
When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!
Reflect
Learning check
Teacher setup, curriculum links and progress descriptors
Spark support
Routine: Think-Pair-Share
Achievement pathway
- Foundation: Identify 'for' and 'while' keywords in simple Python code.
- Developing: Translate a block repeat loop into a Python `for i in range(N):` statement.
- Secure: Construct text-based while loops with counter variables and condition updates.
- Mastering: Evaluate nested loop complexity O(n^2) and refactor inefficient loop structures to improve program execution speed.
Curriculum links
Curriculum strand: coding/loops-repetition
Outcome: AP.03.B.1.1 โ Transition loop concepts into text-based languages (for/while) and analyze computational loop efficiency.
PYP: Reflection ยท Loop optimization and iteration structures are fundamental to efficient software execution.
Learner profile: Reflective
Competency tags
Gate support
Accessibility alternative:
Teacher override: allow
