
- Type
- Lesson plan
- Subject
- Computer Science & Coding
- Topics
- Computer Science
- Ages
- Ages 11-18
- Duration
- about 60 min (suggested)
How can programmers use for loops to repeat commands a fixed number of times without duplicate code?
Overview
Welcome to the Kingdom of the Floating Islands, a mystical realm high above the surface world. In this third lesson of the series, students build directly on skills developed in Island 2, shifting away from manual copy-and-paste coding to focus on repetition using Python for loops.
Using their programmable Agent, students decompose challenges and sequence instructions to automate work across multiple island locations, including an airship, library, forest, mine, and farm. By solving these coding tasks, students gather the required items to help the Wizard and present their finished work to the King.
Learning objectives
By the end of this lesson students will be able to:
- Construct Python for loops to repeat Agent actions a fixed number of times.
- Apply decomposition to break down island construction and gathering tasks into clear steps.
- Sequence Python instructions accurately to guide the Agent through each activity.
- Collect the spell book, gold, and wool to complete the Wizard's request and finish the world.
Blocks and items used in this lesson
Key vocabulary
- For Loop
- A programming structure used to repeat a specific block of code a predetermined number of times.
- Decomposition
- Breaking down a large or complex problem into smaller, manageable parts.
- Sequencing
- Placing computer instructions in the exact order required to produce the correct outcome.
- Agent
- The programmable companion in Minecraft that carries out automated coding commands for the player.
Before class
Lesson sequence
Suggested timing: about 60 minutes in total.
- Introduction & Concept Review10 min
Introduce the Kingdom of the Floating Islands and explain that Island 3 continues the journey started in Island 2. Remind students of their Agent helper and introduce the for loop, explaining how it executes commands a set number of times without needing copied code.
- Airship Construction Tasks15 min
Direct students to begin the coding activities with their Agent:
- Activity 1: Code the Agent to construct the airship covering using a for loop.
- Activity 2: Program the Agent to assemble the airship gangplank.
- Island Resource Gathering25 min
Students guide their Agent through the remaining environmental challenges to advance the kingdom's technological development:
- Activity 3: Automate tasks in the Library.
- Activity 4: Code repeated actions in the Forest.
- Activity 5: Program the Agent to work through the Mine.
- Activity 6: Manage repeated tasks on the Farm.
- Royal Delivery & Wrap-up10 min
Once students have assisted the Wizard by securing the spell book, gold for the crown, and wool for the robe, they deliver these items to the King to complete the world. Conclude with a brief discussion on how loops simplified their code.
Assessment: success criteria
- Student successfully replaces repetitive manual code with functional Python for loops.
- Agent completes all six structured tasks across the airship, library, forest, mine, and farm.
- The spell book, gold, and wool are delivered to the King to conclude the lesson.
Differentiation
Have students count the exact number of blocks needed in the world before writing the loop range so they can match the iteration count to the physical space.
Challenge students to examine their completed code and identify where multiple sequential actions can be condensed into cleaner, more concise loop structures.
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 core coding structure is introduced in Island 3 to avoid copying and pasting code?
Answer: B. The guiding ideas specifically state that Island 3 focuses on repeating code a fixed number of times using a for loop.
2Which helper character executes the Python commands to complete tasks students cannot do alone?
Answer: A. The lesson details explain that the returning Agent helps students complete tasks they would not otherwise be able to finish.
3What computational thinking skill involves breaking large tasks down into codable steps?
Answer: C. The learning objectives define decomposition as breaking problems down into codable solutions for the Agent.
4Which set of items must be gathered for the Wizard before visiting the King?
Answer: D. The completion criteria state that the Wizard needs the spell book, gold for the crown, and wool for the robe.
5Which prior lesson does Island 3 directly build upon?
Answer: B. The lesson lead-in explicitly states that this island builds upon the previous work completed in Island 2.
Resources
Part of the Python Island curriculum
This is lesson 3 of 6 in Python Island.
Frequently Asked Questions
What should students complete before starting Island 3?
Students should ideally complete Island 2, as this lesson explicitly builds upon the coding skills and Agent commands learned in that previous world.
How do students know when they have finished the lesson?
The lesson is complete after students successfully code all six activities, deliver the spell book, gold, and wool to the Wizard, and present the items to the King.
Which CSTA computer science standards are addressed in this lesson?
This lesson aligns with CSTA standards 1A-AP-10, 1A-AP-14, 1B-AP-11, and 1B-AP-12, focusing on decomposition, sequencing, and looping structures.
Adapted from Island 3 by Minecraft Education on Minecraft Education, last updated Mar 19, 2025. This classroom version, the timings and the quiz were written by 9Minecraft Education.




















