Learning objective
- To use nested loops to create patterns on the micro:bit.
Success criteria
- I can explain what a nested loop is.
- I
This content is for subscribers only. Join for access today.
National curriculum
Computing
Pupils should be taught to:
- Design,
This content is for subscribers only. Join for access today.
Cross-curricular links
English
Spoken language
Pupils should
This content is for subscribers only. Join for access today.
Before the lesson
This content is for subscribers only. Join for access today.
Lesson plan
Recap and recall
Explain that the children will work with a partner to recall and expand on key facts from the last lesson. Display the Presentation: Tell me more and read the two facts aloud. Allow time for a paired discussion. Encourage the children to turn each statement into a longer sentence by adding a reason, an example…
This content is for subscribers only. Join for access today.
Extended-mode explainer videos
How to extend your display to view the lesson page and preseantion mode simultaneously. Choose your operating system below to watch the video
If you need further support with extending your display,
please contact [email protected].
Extended-mode explainer video: For Mac
Extended-mode explainer video: For Windows
Adaptive teaching
Pupils needing extra support
- Should visit the coding station and talk through their nested loops with others to support understanding the loop structure and make confident changes to their code.
- Should use the Resource: Coding station prompt cards: support version, which highlights the outer and inner loops, to help them identify which part of the nested loop controls rows and which controls columns before making changes.
- Could use the sentence stems displayed on the board to verbalise what the outer and inner loops do.
- Could rewatch the Pupil video: Nested loops in Python, showing the nested loop as a pattern to reinforce the row/column structure.
Pupils working at greater depth
- Should adapt the nested loop by adding a purposeful input (for example, button_a.is_pressed()) to trigger a change in the pattern or brightness while maintaining correct loop structure and indentation, explaining how their addition changes the sequence of rows and columns
- Should reason about how swapping the order of the loops would change the output and justify their prediction before running the program;
- Should suggest another program where a nested loop structure could be reused and explain why it would be appropriate.
- Should use precise programming vocabulary to explain how Python processes the outer and inner loops and why accuracy in indentation and structure matters for controlling the pattern.
This content is for subscribers only. Join for access today.
Assessing progress and understanding
Pupils with secure understanding indicated by: explaining what a nested loop is
This content is for subscribers only. Join for access today.
Vocabulary definitions
-
inner loop
The loop inside another loop that repeats the smaller steps.
-
outer loop
The main loop that repeats the big steps.
This content is for subscribers only. Join for access today.