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.