Lesson plan

Unit 7: Iteration

Explore iteration and loops using MakeCode, practice debugging repetitive code, and program an automated staircase design in Minecraft.

Unit 7: Iteration
Ages
Ages 11-13
Duration
1 hour
Essential question

How can programmers use loops to repeat actions efficiently and construct complex structures in Minecraft?

Overview

Iteration is a foundational computer science principle centered on repeating actions. By using loops, programmers can write cleaner, more efficient code that executes repetitive tasks in significantly fewer steps.

In this intermediate unit, students explore iteration through unplugged discussions, hands-on MakeCode challenges, and debugging exercises. They apply their learning by designing and building a staircase pattern within a downloadable Minecraft world.

Learning objectives

By the end of this lesson students will be able to:

  • Explain the concept of iteration and identify synonymous programming terms.
  • Describe and compare different types of loops available in MakeCode.
  • Identify errors and debug programs that use iteration.
  • Design and code an original staircase project in Minecraft using loops.

Blocks and items used in this lesson

Key vocabulary

Iteration
The process of repeating a sequence of instructions in a computer program.
Loop
A programming structure that repeats a set of commands until a specific goal or condition is reached.
Debugging
Finding and fixing mistakes or unexpected behaviors within computer code.

Before class

Lesson sequence

Suggested timing: about 60 minutes in total.

  1. Introduction to Iteration (Lesson A)15 min

    Use the classroom presentation and unplugged activities to introduce iteration. Discuss why coders repeat actions and explore everyday examples of repeating sequences.

  2. Coding with Loops (Lesson B)15 min

    Open MakeCode and examine different loop blocks. Guide students through exercises where they replace long chains of repetitive code with concise loops.

  3. Debugging Iteration (Lesson C)15 min

    Provide students with buggy code samples containing iteration mistakes. Have students identify logic errors, fix loop counts, and verify their solutions in Minecraft.

  4. Creative Staircase Project (Lesson D)15 min

    Task students with planning and coding an original staircase design using loops. Students test their automated builds in the downloadable world and check their work against the assessment guide.

Assessment: success criteria

  • Student accurately defines iteration and names related terms like loops.
  • Code demonstrates appropriate loop selection to avoid redundant lines of instruction.
  • Student successfully identifies and corrects bugs in provided repetition scripts.
  • Student completes an original Minecraft staircase design using MakeCode loops.

Differentiation

Support

Provide partially completed loop templates and guide learners through tracing each step of the staircase manually before coding.

Stretch

Encourage advanced students to nest loops or incorporate multiple block patterns into their automated staircase design.

Knowledge check

5 questions to check understanding after the lesson. Tap an answer to see if it is right; the score appears at the end.

  1. 1What is the primary definition of iteration in computer programming?

  2. 2Why do programmers use iteration when writing code?

  3. 3Which tool is used in this unit to practice coding different kinds of loops?

  4. 4What specific construction project do students design using loops in this unit?

  5. 5Which lesson in Unit 7 focuses on locating and resolving errors in repetitive code?

Resources

Part of the Code with Minecraft curriculum

This is lesson 7 of 11 in Code with Minecraft.

  1. Unit 1: Introduction
  2. Unit 2: Events
  3. Unit 3: Coordinates
  4. Unit 4: Variables
  5. Unit 5: Conditionals
  6. Unit 6: Functions
  7. Unit 7: Iteration
  8. Unit 8: Arrays
  9. Unit 9: AI
  10. Unit 10: Final Project
  11. Hour of AI: Generation AI

Frequently Asked Questions

How long does each lesson in Unit 7 take to teach?

Each lesson (A through D) is designed to run approximately 45 to 60 minutes, depending on the time allocated for hands-on coding and exploration.

What supporting files are available to guide assessment?

Teachers can use the Assessment Guide found in the supporting files alongside the formative assessments embedded in each lesson and the final project.

What age group and skill level is this unit written for?

This unit is designed for students aged 11 to 13 at an intermediate computer science experience level.

Adapted from Unit 7: Iteration by Minecraft Education on Minecraft Education, last updated Feb 4, 2025. This classroom version, the timings and the quiz were written by 9Minecraft Education.

You May Also Like

9Minecraft Education is an independent teaching resource and is not affiliated with Mojang or Microsoft. Lesson plans here are our own classroom-ready adaptations; each one links to the original resource and credits its author. © 2026 9minecraft.net