Skip to content
PlayOwl

Coding · Grade 5

Nested Loops and Patterns

Fifth graders trace nested loops (the inner loop runs completely for every time round the outer loop), use them to build rows-and-columns patterns, make growing triangle patterns by using the outer counter in the inner loop, and program robots with repeats inside repeats.

  • 4 lessons
  • About 90 minutes
  • Nested loops check: 8 questions
  • Ways to answer: program with blocks, choose an answer, trace code and type a number
Try it now (no account) One of the five free starter courses Open in PlayOwl

What learners will discover

  • Trace a nested loop and count how many times the inner body runs.
  • Use nested loops to make 2D patterns of rows and columns.
  • Use the outer counter inside the inner loop to make growing patterns.
  • Program robot paths with repeats inside repeats.

Lessons

  1. Loops inside loops 4 steps2 practiceabout 17 min
  2. Rows and columns 4 steps2 practiceabout 17 min
  3. Growing patterns 4 steps2 practiceabout 16 min
  4. Nested repeats for robots 5 steps2 practiceabout 18 min
  5. Nested loops check 8 questions at the end

Keep exploring

Games to practice with

More 5th grade coding

Guide for grown-ups