Grade 5: conditionals in Minecraft
(From: code.org https://curriculum.code.org/csf-20/express/13/ )If you need any assistance in setting up your class in code.org, do not hesitate to contact Erica Doucet, Kerry Crocker or Haley Brooks.
On a computer? Click "file" then "make a copy" to save and make changes.
On an iPad? Select the 3 dots in the top right hand corner. "Share and Export" then "Make a Copy".
C3.1 solve problems and create computational representations of mathematical situations by writing and executing code, including code that involves conditional statements and other control structures
C3.2 read and alter existing code, including code that involves conditional statements and other control structures, and describe how changes to the code affect the outcomes
Define circumstances when certain parts of a program should run and when they shouldn't.
Determine whether a conditional is met based on criteria.
Define circumstances when certain parts of a program should run and when they shouldn't.
Determine whether a conditional is met based on criteria.
Access to Code.org.
Teacher Prep:
Set up class sections and student accounts.
Send parents a Code.org letter explaining why their child is learning computer science and how they can help their child sign in at home.
Share login information with students and parents.
Use the teacher dashboard to track student progress. You can now see when your students last worked on the assigned course.
Paper/pencil
iPads
Condition - Something a program checks to see if it is true before allowing an action.
Conditionals - Statements that only run under certain conditions.
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
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.
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 (we recommend puzzle 11.) Once all questions have been addressed, transition students to computers and let them start pair programming.
Having students write about what they learned, why it’s useful, and how they feel about it can help solidify any knowledge they obtained today and build a review sheet for them to look to in the future.
Journal Prompts:
Draw a feeling face to show how you felt during today’s lesson.
Draw something else you could have built in this minecraft world.
Can you draw a scene where someone is using a conditional?
Opportunities for Assessment
SEL Self-Assessments (English) and Teacher Rubric
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.