Pupil video: Nested loops in Python

Lock

Watch the full video

Exploring nested loops in Python

This Computing video introduces Year 6 pupils to nested loops and explains how using one loop inside another can create patterns on a micro:bit. It supports the children in understanding how nested loops control repeated actions in two directions.

The video introduces nested loops using both Scratch and Python. It explains how the outer loop manages larger steps while the inner loop repeats smaller actions and how indentation in Python shows that one loop sits inside another. The children explore how nested loops use x and y coordinates to light the micro:bit LED grid, adjusting brightness, rows and pauses to change patterns. The video encourages experimentation and problem-solving by creating new patterns using code.

This video is part of Kapow Primary’s Computing Year 5 and 6 videos, which enable teachers and pupils to develop their digital skills, explore key computing concepts and create their own digital projects.

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.