Learning objective

  • To use nested loops to create patterns on the micro:bit.

Success criteria

  • I can explain what a nested loop is.
  • I
Lock

This content is for subscribers only. Join for access today.

National curriculum

Computing

Pupils should be taught to:

  • Design,
Lock

This content is for subscribers only. Join for access today.

Before the lesson

Lock

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…

Lock

This content is for subscribers only. Join for access today.

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.
Lock

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

Lock

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.

Lock

This content is for subscribers only. Join for access today.

Our team comprises experienced classroom teachers who love the foundation subjects
Find out more
Kapow logo

Maintained by: Kapow Primary team

_
For copyright reasons, you may not screenshot this page.
Press esc to exit