Lesson plan

Unit 5: Conditionals

Students learn conditional logic through unplugged exercises, Minecraft coding, debugging tasks, and a collaborative creative project.

Unit 5: Conditionals
Ages
Ages 8-13
Duration
1 hour
Essential question

How do conditional statements determine when and how a program performs specific actions?

Overview

In this unit, students investigate the foundational computer science concept of conditionals. Conditionals instruct computers to execute tasks only when specific rules or criteria are satisfied, forming the backbone of logical decision-making in software design.

Using Minecraft Education, learners explore IF-THEN and IF-ELSE-THEN structures through unplugged activities, hands-on coding, and debugging exercises. The unit culminates in an original collaborative project where students apply their knowledge to build unique gameplay interactions.

Learning objectives

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

  • Construct functional IF-THEN and IF-ELSE-THEN conditional statements in code
  • Explain the importance of conditionals within computer science and Minecraft gameplay
  • Evaluate code to locate and debug logical errors
  • Collaborate with peers to design an original project that applies conditional logic

Blocks and items used in this lesson

Key vocabulary

Conditional
A rule or test in code that must be met before a specific action can happen.
IF-THEN
A coding structure that performs an action only when a designated condition is true.
IF-ELSE-THEN
A conditional structure that runs one action if a rule is met, and a different action if it is not.
Debugging
The process of reading through code, finding mistakes, and correcting them.

Before class

Lesson sequence

Suggested timing: about 210 minutes in total.

  1. Lesson A: Introduction to Conditionals50 min

    Introduce the concept of conditional statements using the classroom presentation and unplugged exercises. Guide students to identify real-world rules and understand how IF-THEN rules control actions.

  2. Lesson B: Coding with Conditionals (Session 1)50 min

    Transition students into Minecraft Education to build and test basic IF-THEN and IF-ELSE-THEN code blocks. Have students observe how their in-game commands react to specific game states.

  3. Lesson B: Coding with Conditionals (Session 2)50 min

    Present students with problematic code examples that need troubleshooting. Guide learners through debugging procedures to identify errors and fix broken logic in their programs.

  4. Lesson C: Get Creative with Conditionals60 min

    Have students work collaboratively on an independent creative project. Teams design and implement an original coding idea that relies on conditional statements to function inside the Minecraft world.

Assessment: success criteria

  • The student correctly forms IF-THEN and IF-ELSE-THEN statements in their code.
  • The student identifies and fixes bugs in sample problem code.
  • The student articulates how conditionals function in programming and gameplay.
  • The student successfully completes the independent creative project with their team.

Differentiation

Support

Provide guided code templates and encourage students to walk through logic paths using unplugged IF-THEN rules before typing code.

Stretch

Encourage students to add multiple branching IF-ELSE-THEN conditions to increase the complexity of their creative project.

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 role of a conditional statement in programming?

  2. 2Which conditional statement provides an alternative action if the first rule is not satisfied?

  3. 3What are programmers doing when they debug their code?

  4. 4What must happen before a conditional action is performed?

  5. 5What is the focus of Lesson C in Unit 5?

Resources

Part of the Code with Minecraft curriculum

This is lesson 5 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 this unit take to teach?

Each lesson runs between 45 and 60 minutes, with Lesson B split across two separate class sessions.

What resources are available to help guide assessment during this unit?

Teachers can reference the Assessment Guide and Educator's Guide included in the supporting files to conduct formative evaluations and grade the independent project.

Adapted from Unit 5: Conditionals 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