Skip to content
PlayOwl

Coding · Grade 6

Loops and Iteration

Learners use for loops with range(), build running totals and counts with accumulators, and trace while loops that stop when a condition becomes False, including spotting infinite loops. Robot puzzles with repeat blocks show how repetition shortens programs, and learners decide when a for or while loop fits a task.

  • 4 lessons
  • About 80 minutes
  • Check what you learned: 8 questions
  • Ways to answer: program with blocks, choose an answer, put code in order, trace code, type a number and true or false
Try it now (no account) One of the five free starter courses Open in PlayOwl

What learners will discover

  • Trace for loops that use range() with a start, a stop that is not included, and a step.
  • Use counters and accumulators that start before a loop and update inside it.
  • Trace while loops, explain how the condition makes them stop, and fix an infinite loop.
  • Use repeat blocks to shorten programs and choose between for and while for a task.

Lessons

  1. Repeating with for and range 6 steps3 practiceabout 20 min
  2. Counters and accumulators 6 steps4 practiceabout 20 min
  3. while loops 5 steps3 practiceabout 20 min
  4. Choosing and using loops 5 steps2 practiceabout 18 min
  5. Check what you learned 8 questions at the end

Keep exploring

Games to practice with

More 6th grade coding

Guide for grown-ups