
- Type
- Lesson plan
- Subject
- Computer Science & Coding
- Topics
- Computer Science
- Ages
- Ages 11-13
- Duration
- 1 hour
- Level
- Intermediate
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.
- 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.
- 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.
- 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.
- 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
Provide partially completed loop templates and guide learners through tracing each step of the staircase manually before coding.
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.
1What is the primary definition of iteration in computer programming?
Answer: A. Iteration refers to ways to make things repeat within a program.
2Why do programmers use iteration when writing code?
Answer: B. Programmers repeat actions to achieve specific effects or complete tasks in fewer steps.
3Which tool is used in this unit to practice coding different kinds of loops?
Answer: C. The unit objectives focus on identifying and coding different types of loops in MakeCode.
4What specific construction project do students design using loops in this unit?
Answer: D. The curriculum specifies an original project where students apply loops to build a staircase design.
5Which lesson in Unit 7 focuses on locating and resolving errors in repetitive code?
Answer: A. Lesson C is dedicated to debugging programs that use iteration.
Resources
- Lesson package (.zip)Everything the author attached to this lesson in one download.
- Educator's GuideCoding with Minecraft: Unit 7 - Iteration
- Classroom PresentationCoding with Minecraft: Unit 7 - Iteration
- Assessment GuideCoding with Minecraft
- Curriculum OverviewCoding with Minecraft
- Lesson worldOpens the world page in Minecraft Education (sign-in with a school account may be needed).
Part of the Code with Minecraft curriculum
This is lesson 7 of 11 in Code with Minecraft.
- Unit 1: Introduction
- Unit 2: Events
- Unit 3: Coordinates
- Unit 4: Variables
- Unit 5: Conditionals
- Unit 6: Functions
- Unit 7: Iteration
- Unit 8: Arrays
- Unit 9: AI
- Unit 10: Final Project
- 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.























