Teacher video: Nested loops in Python

Lock

Watch the full video

CPD badge

Exploring nested loops in Python

This Computing video introduces teachers to nested loops, explaining how an outer loop controls larger steps while an inner loop repeats smaller actions to create patterns in two directions.

It shows how nested loops work in block-based coding and Python, highlighting the use of grouping in Scratch and indentation in Python. It explains how this concept is applied using the micro:bit LED grid, where x and y coordinates control rows and columns. Teachers are supported in helping children adapt the code by changing values such as brightness and pauses to explore how patterns change.

This video is part of Kapow Primary’s Year 5 and 6 videos, which provide guidance and support to help teachers develop confidence and subject knowledge when delivering the computing curriculum.

See more of our Year 6 Computing scheme of work.

Please don’t screenshot or copy images from this page.
Kapow Primary resources are created by teachers and protected by copyright. Copying images or slides into your own presentations (for example using the Snipping Tool) counts as reproducing the resource and isn’t permitted under the Kapow licence.
This resource is being accessed through your school’s Kapow licence.
Thank you for respecting the work of the teachers who create these materials.