
- Type
- Lesson plan
- Subject
- Computer Science & Coding
- Topics
- Computer Science
- Ages
- Ages 8-13
- Duration
- 1 hour
- Level
- Beginner
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.
- 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.
- 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.
- 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.
- 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
Provide guided code templates and encourage students to walk through logic paths using unplugged IF-THEN rules before typing code.
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.
1What is the primary role of a conditional statement in programming?
Answer: B. Conditionals require a certain rule or condition to be met before an action takes place.
2Which conditional statement provides an alternative action if the first rule is not satisfied?
Answer: A. An IF-ELSE-THEN structure defines what happens when the initial condition is met and what alternate action occurs if it is not.
3What are programmers doing when they debug their code?
Answer: C. Debugging is the process of evaluating code to identify problems and correcting them.
4What must happen before a conditional action is performed?
Answer: B. A conditional only executes its action after its specified condition has been satisfied.
5What is the focus of Lesson C in Unit 5?
Answer: B. Lesson C is titled Get Creative with Conditionals, where students design an original project.
Resources
- Lesson package (.zip)Everything the author attached to this lesson in one download.
- Educator's GuideCoding with Minecraft: Unit 5 - Conditionals
- Classroom PresentationCoding with Minecraft: Unit 5 - Conditionals
- 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 5 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 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.























