Lesson 12: Conditionals in Minecraft: Voyage Aquatic
60 minutes
Overview
In this skill-building/context-setting lesson, students will get the chance to practice content that they have learned up to this point, as well as getting a sneak peek at conditionals!
Purpose
This set of puzzles will work to solidify and build on the knowledge of loops, and introduce conditionals. By pairing these two concepts together, students will be able to explore the potential for creating fun and innovative programs in a new and exciting environment.
Standards
AP - Algorithms & Programming
- 1B-AP-10 - Create programs that include sequences, events, loops, and conditionals.
Agenda
Objectives
Students will be able to:
- Define circumstances when certain parts of a program should run and when they shouldn't.
- Determine whether a conditional is met based on criteria.
Preparation
- Play through the puzzles associated with this lesson to find any potential problem areas for your class.
- Make sure every student has a reflection journal.
Links
Heads Up! Please make a copy of any documents you plan to share with students.
For the teachers
- CSF - Course E - Slides 2022-2023 - Slides (Download)
Vocabulary
- Condition - A statement that a program checks to see if it is true or false. If true, an action is taken. Otherwise, the action is ignored.
- Conditionals - Statements that only run under certain conditions.
Teaching Guide
Warm Up (15 minutes)
Introduction
Display: Show “Reflect” slide
Reflect:
- Sketch out a drawing you made last class in the Functions with Artist lesson.
- What code do you need to create your drawing?
Display: Show “Warm Up Activity” slide
Gather the class together and ask two volunteers to walk straight in some direction in the classroom. If they encounter a chair out of place, they must step over it. If they reach a wall, they must sit down.
Once all of the students are sitting down, ask how you would program a robot to respond to a wall or a chair. Remind students that you cannot simply say "Step over chair" unless you know there is a chair, and you will not always know there is a chair. It might be helpful to translate the task into instructions like:
- while there is a path ahead
- walk forward
- if there is a chair, step over it
- sit down
Display: Show "Vocabulary" slide
Tell students they will be using conditionals during this lesson. Give the definition of:
- Condition: A statement that a program checks to see if it is true or false. If true, an action is taken. Otherwise, the action is ignored.
- Conditionals: Statements that only run under certain conditions.
Open up a discussion of when you might use a conditional in your code.
Main Activity (30 minutes)
Conditionals in Minecraft: Voyage Aquatic
Students are in for a real treat with this lesson. It's likely most of your students have heard of Minecraft, but give a brief introduction for those that may not know.
Minecraft is a game of cubes. You can play as Alex or Steve as you work through mazes. You'll need to pick up items, and explore in a world made up of cubes of things.
Demonstrate one of the puzzles to the class. Once all questions have been addressed, transition students to computers and let them start pair programming.
Display: Show the "Minecraft: Voyage Aquatic Introduction" video
Display: Show the "Level 2-4 - Skill Building" slide
Display: Show the "Minecraft: Voyage Aquatic Repeat Until" video
Display: Show the "Level 6-8 - Skill Building" slide
Display: Show the "Minecraft: Voyage Aquatic Conditionals" video
Display: Show the "Level 10-14 - Skill Building" slide
Display: Show the "Minecraft: Voyage Aquatic Congratulations" video
Wrap Up (15 minutes)
Reflection
Display: Show the "Reflect" slide
Reflect: Can you draw a scene where someone is using a conditional?
Extended Learning
Use these activities to enhance student learning. They can be used as outside of class activities or other enrichment.
More Minecraft
If you find that your class really enjoys the Minecraft environment, here are some links to other Minecraft games they can play online. These games will also teach basic coding skills.
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.