Lesson plan

Island 4

Students program their Minecraft Agent with Python while loops across four island challenges to repair an airship and advance kingdom technology.

Island 4
Ages
Ages 11-18
Essential question

How can programmers use while loops to repeat actions efficiently without knowing the exact number of repetitions in advance?

Overview

In this computer science lesson set within the Kingdom of the Floating Islands, students explore how to automate repetitive actions using Python. Building on previous foundational coding skills, learners discover how while loops allow a program to repeat commands dynamically until a target condition changes, eliminating the need to duplicate lines of code.

Working alongside their in-game Agent, students break down complex construction and repair challenges across four floating environments. By structuring commands in proper sequence and applying while loops, learners restore vital infrastructure and earn the credentials needed to complete the world.

Learning objectives

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

  • Distinguish between the purpose of a while loop and a for loop in Python.
  • Apply decomposition to break down floating island challenges into manageable steps for the Agent.
  • Sequence Python commands correctly so the Agent can navigate and complete designated tasks.
  • Construct while loops that continue repeating actions as long as a specific condition is met.

Blocks and items used in this lesson

Key vocabulary

While loop
A programming command that repeats a block of code as long as a given condition remains true.
For loop
A loop structure typically used to repeat a set of actions a specific, predetermined number of times.
Decomposition
The process of breaking a complex problem down into smaller, easier-to-solve parts.
Sequencing
Arranging programming instructions in the exact order required for a computer or Agent to execute them successfully.

Before class

Lesson sequence

Suggested timing: about 60 minutes in total.

  1. Introduction & Concept Review10 min

    Introduce the lesson by connecting back to Island 3. Explain that computers excel at rapid repetition and that programmers avoid copying and pasting code. Discuss the core concept of a while loop, contrasting loops that repeat while a condition holds true with fixed-count for loops.

  2. Coding Tasks: Infrastructure & Industry20 min

    Have students load into Island 4 and summon their Agent. Guide them through the first two Python activities:

    • Activity 1 (Distant Island Bridge): Use loop logic to guide the Agent across the gap and construct a bridge.
    • Activity 2 (Mine Factory): Decompose extraction routines to automate mining operations.
  3. Coding Tasks: Nature & Flight20 min

    Students continue their programming work through the remaining island locations:

    • Activity 3 (Botanical Gardens): Program the Agent to handle maintenance routines in the gardens.
    • Activity 4 (Airship Factory): Automate repairs on the airship to earn the Certificate of Airworthiness.
  4. Final Delivery & World Wrap-up10 min

    Students take their Certificate of Airworthiness and deliver it to the Prime Minister inside the Parliament building to conclude the official storyline. Convene as a class to review how while loops made each Agent task more efficient than writing line-by-line commands.

Assessment: success criteria

  • Student successfully constructs functional while loops to solve assigned Python tasks.
  • The Agent completes all four island tasks: Distant Island Bridge, Mine Factory, Botanical Gardens, and Airship Factory.
  • The learner collects the Certificate of Airworthiness and delivers it to the Prime Minister in the Parliament building.
  • Student accurately explains during class discussion how a while loop repeats code based on conditions.

Differentiation

Support

Provide scaffolding on breaking tasks into sequential steps and verify loop conditions before students run their Agent programs.

Stretch

Students who complete the main tasks can freely explore the unlocked underground village beneath the kingdom.

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 Python concept taught throughout Island 4?

  2. 2How does a while loop decide whether to continue executing code?

  3. 3Which helper character returns in this lesson to carry out student code?

  4. 4What must students do after repairing the airship to complete the world?

  5. 5What bonus area becomes accessible to students who finish their work early?

Resources

Part of the Python Island curriculum

This is lesson 4 of 6 in Python Island.

  1. Island 1
  2. Island 2
  3. Island 3
  4. Island 4
  5. Island 5
  6. Island 6

Frequently Asked Questions

Are there extra coding challenges in the unlocked underground village?

No. The source notes that while early finishers gain access to explore the hidden underground village, it contains no additional coding tasks.

Do students need to have completed Island 3 before starting Island 4?

While Island 4 builds directly on concepts and Agent familiarity from Island 3, students only need an understanding of basic sequencing and how to direct the Agent to begin working with while loops.

Adapted from Island 4 by Minecraft Education on Minecraft Education, last updated Mar 19, 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