Lesson 2: Nested loops

Still using Logo, pupils explore how having loops-within-loops changes the look of their designs.

Before the lesson

Learning objective

  • To understand nested loops

National curriculum

Pupils should be taught to:

  • Design, write and debug programs that accomplish specific goals;, including controlling or simulating physical systems; solve problems by decomposing them into smaller parts
  • Use sequence, selection, and repetition in programs; work with variables and various forms of input and output

Success criteria

Cross-curricular links

Attention grabber

Main event


Pupils needing extra support: Provide them with the following format:

repeat 10 [repeat 4[fd 100 rt 90] rt 36]

Explaining that they should only change the coloured numbers. The red number should be the number of sides the shape has, and the blue number should be the angle that’s written underneath the shape on the command sheet.


Pupils working at greater depth: Should be challenged to create a circle and then include that within a nested loop. Should be editing nested loops after creation, showing an awareness of which parts they can or can’t change.

Wrapping up

Assessing pupils' progress and understanding


Created by:
Sway Grantham,  
Computing specialist
Sway Grantham (@SwayGrantham) is a Primary School Teacher, a CAS Master Teacher and Specialist Leader in Education for Primary ICT. She also has a BCS Certificate in Computer Science Teaching (Primary). She has written several curricula and conducted research into the…
Find out more