
- Type
- Lesson plan
- Subject
- Computer Science & Coding
- Topics
- Computer Science
- Ages
- Ages 11-18
- Duration
- about 60 min (suggested)
How can we use Python conditional statements to help an automated Agent make decisions and solve sequential problems?
Overview
In the Kingdom of the Floating Islands, students explore how computers make decisions through conditional logic. Building on foundational concepts from previous lessons, this unit teaches learners how to structure Python if and else statements, evaluate booleans, and compare integers to solve technical challenges.
Students deploy their in-game Agent to navigate six distinct island zones: Weather, Mine 1, Forest, Farm, Mine 2, and the Blacksmith. By breaking tasks down through decomposition and ordering their commands with proper sequencing, learners automate the Agent to complete tasks and retrieve an iron ingot to present to the mayor.
Learning objectives
By the end of this lesson students will be able to:
- Write Python if and else statements to make decisions based on boolean values and integer comparisons.
- Apply sequencing to order programming steps correctly for the Agent.
- Decompose complex island tasks into smaller, codable instructions.
- Complete all six island challenges and deliver an iron ingot to the mayor.
Blocks and items used in this lesson
Key vocabulary
- If Statement
- A programming instruction that executes a block of code only when a specified condition evaluates to true.
- Else Statement
- An alternative code block that executes when the condition in the preceding if statement is false.
- Boolean
- A data value that can represent only one of two states: true or false.
- Decomposition
- The process of breaking a complex problem down into smaller, manageable, and codable parts.
- Sequencing
- Placing commands in the exact order required for a computer program to run correctly.
Before class
Lesson sequence
Suggested timing: about 60 minutes in total.
- Warm-up & Introduction10 min
Introduce the Kingdom of the Floating Islands and explain that this mission builds directly upon Island 1. Discuss how computers make decisions using conditional logic, and review the syntax for Python if statements, else blocks, integer comparisons, and boolean checks.
- Exploration & Activities 1-320 min
Guide students into their Python Notebooks to begin programming the Agent. Students apply sequencing and decomposition to tackle the first three island locations:
- Activity 1: Weather
- Activity 2: Mine 1
- Activity 3: Forest
- Advanced Challenges & Activities 4-620 min
Learners proceed through the remaining three coding zones, expanding their use of conditions to resolve more complex problems:
- Activity 4: Farm
- Activity 5: Mine 2
- Activity 6: Blacksmith
- World Completion & Reflection10 min
Have students take the iron ingot obtained from their tasks and hand it to the mayor to complete the world. Conclude with a brief class discussion on how conditional decisions enabled the Agent to accomplish tasks that the player could not perform alone.
Assessment: success criteria
- Student accurately constructs Python if and else statements in their notebook.
- Student successfully uses integer and boolean comparisons to guide Agent decisions.
- Student completes all six island coding challenges in sequence.
- Student obtains and delivers the iron ingot to the mayor.
Differentiation
Pair students to collaborate on their conditional logic and trace the code sequence step by step before running it.
Challenge learners to optimize their Python code by eliminating redundant conditional checks in the later activities.
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 programming structure is introduced in Island 2 to allow the Agent to make decisions?
Answer: B. The lesson specifically focuses on conditional logic and if-style decisions in Python.
2What item must be delivered to the mayor to finish Island 2?
Answer: C. Completion requires the student to hand the iron ingot to the mayor.
3Which location is NOT one of the six coding activity zones on Island 2?
Answer: A. The six zones are Weather, Mine 1, Forest, Farm, Mine 2, and Blacksmith.
4What computational thinking skill involves dividing a large challenge into smaller, codable pieces?
Answer: D. Decomposition means breaking problems down into smaller parts so they can be coded for the Agent.
5When does the code inside an 'else' block execute?
Answer: A. An else statement provides an alternative set of instructions when the if condition is not met.
Resources
Part of the Python Island curriculum
This is lesson 2 of 6 in Python Island.
Frequently Asked Questions
Is completion of Island 1 mandatory before starting Island 2?
Island 2 builds upon the Agent skills from Island 1, but students with basic Python knowledge can start here to focus directly on conditional logic.
How can I verify that a student has finished the entire lesson?
A student has finished once they have completed all six coding activities and handed the resulting iron ingot to the mayor in-game.
Which coding environment is used within this Minecraft world?
Students write text-based code directly using Python Notebooks integrated into Minecraft Education.
Adapted from Island 2 by Minecraft Education on Minecraft Education, last updated Mar 19, 2025. This classroom version, the timings and the quiz were written by 9Minecraft Education.




















