Educator Guide
Single Student
Conditionals in coding are loops that have to meet certain requirements in order to run. They
are important because they allow the program to only run when various conditions are met which
create a more complex code.
For more information on conditionals, refer to:
Conditionals in Minecraft: In Minecraft, conditionals are used to program the agent or player
to do a specific action ONLY when a certain condition is met. Using the If/Then or the
If/Then/Else block or code will set the agent or player to check to see if a certain condition is
met. If it is met, a specific action in the Minecraft world will run.
These learning activities are designed to provide the learner with flexibility and choice in his/her
learning.
1. The learner will be introduced to three tutorials that are at three levels of difficulty (Novice,
Intermediate and Expert) which are followed by an educational activity where he/she can
apply coding skills.
2. Within each tutorial, the learner will have the option of selecting a coding language
(Blocks, Javascript or Python).
The learner may choose a tutorial at his/her appropriate difficulty level and language OR choose
to complete all tutorials and the educational activity. It will take approximately an hour to
complete all activities.
Novice: Agent Maze
Intermediate: Chopping Trees
Expert: Agent Pyramid
Educational scenario:
The learner is free to engage with activities in Block coding, Javascript and/or Python and does
not need to complete all the activities.
The learner will create a cause and effect experience within Minecraft: Education Edition.
The learner will:
Learn how to use a variety of loops to repeat sections of code.
Learn the purpose of conditional loops.
Learn how conditional loops work inside code.
Definition
Code
If then
Runs code when a
condition is met.
Block
Definition
Code
JavaScript
if (true) {
}
Python
if True:
pass
Forever
Runs the
code repeatedly
when
the Makecode coding
window closes.
Block
JavaScript
loops.forever(function () {
})
Python
def forever():
pass
loops.forever(forever)
If then else
Runs a specific code
depending on
whether a condition
is met or not met.
Block
JavaScript
if (true) {
} else {
}
Python
if True:
pass
else:
pass
Repeat
Runs part of the code
a defined number of
times.
Block
Definition
Code
JavaScript
for (let index = 0; index < 10; index++) {
}
Python
for index in range(10):
pass
While
Repeats the code if a
defined condition is
met.
Block
JavaScript
while (true) {
}
Python
while True:
pass
1. Conditionals are loops that have to meet certain requirements in order to run
2. Boolean is an expression that is either true or false.
1. Are there chores you do at your home that you must do in order to earn your
allowance?
Example Answers: Make my bed, unload the dishwasher, walk the dog
2. If your parents told you that if you make all A’s, they will give you $50 but you make all
A’s and 1 B. Will you get the money? Why or why not?
No, the $50 was on the condition that I got all A’s.
3. In a video game, what are some of the requirements that must be met in order to
complete the game?
Accomplish the task within the time limit, follow the rules of the game.
(Novice-5 minutes)
Main objective:
The learner will code the agent to find its way through any maze by using chat commands
and an if / else loop.
Answer Key: https://makecode.com/_5rLHph15H4YX
(Intermediate-10 minutes)
Main objective:
The learner will use chat commands and loops to code the agent to automatically chop down
trees.
Answer key: https://makecode.com/_bHYdKfKCy7Ri
(Expert-5 minutes)
Main objective:
The learner will use chat commands and loops to code the agent to build a pyramid.
Answer key: https://makecode.com/_ig5Ho3V8LRJg
(15 minutes)
Subject Area: Language Arts
Main purpose of the activity:
The learner will:
Practice cause and effect with if statements.
Code an if statement that says if a certain crop is planted, a specific animal that likes
to eat that crop is spawned.
The learner’s challenge is to use if statements to spawn animals that eat that particular crop. In
this world, there are various enclosures that call for a type of plant to be planted and a specific
animal to be spawned. The learner will have to read the signs at each enclosure and then
write the code using an if statement. (It should be - if the crop is planted, then the specific
animal is spawned.)
Outcome of This Activity:
The learner will have successfully used if statements to spawn specific plants for a specific
animal.
Possible Solution for this Activity: https://makecode.com/_KJoEkh89baVy
(5 minutes)
Ask the learners about new skills that they have practiced during the activity to reinforce the
concepts.
1. What does a Forever loop do?
It makes the code inside the loop repeat forever.
2. What is a Conditional?
It’s a statement that tells a program to do different actions depending on whether a condition
is true or false.
3. If the condition of the if portion of the code in an if / else loop is met, will the else portion
run?
No. Else will only run if the if portion of the code is not met.
4. Describe a while loop.
A while loop will run the code only while a certain condition is being met.
Minecraft: Education Edition offers many opportunities for teachers and learners to extend and
enrich the learning experience beyond this lesson.
Learners could extend the conditionals by utilizing the else portion to include another
action. For example, if the corn is planted, a horse is spawn, ELSE, a zombie horse is
spawned.
Students could work through the puzzles using conditionals at this link:
COMMON CORE STATE STANDARDS-ENGLISH LANGUAGE ARTS
http://www.corestandards.org/ELA-Literacy/RI/3/3/
CCSS.ELA-LITERACY.RI.3.3: Describe the relationship between a series of historical events,
scientific ideas or concepts, or steps in technical procedures in a text, using language that
pertains to time, sequence, and cause/effect.
CCSS.ELA-LITERACY.RI.3.8: Describe the logical connection between particular sentences
and paragraphs in a text (e.g., comparison, cause/effect, first/second/third in a sequence)
COMPUTER SCIENCE TEACHERS ASSOCIATION (CSTA) COMPUTER SCIENCE
STANDARDS K-12 https://www.csteachers.org/Page/standards
1A-AP-08: Model daily processes by creating and following algorithms (sets of step-by-step
instructions) to complete tasks.
1A-AP-09: Model the way programs store and manipulate data by using numbers or other
symbols to represent information.
1A-AP-10: Develop programs with sequences and simple loops, to express ideas or address a
problem.
1A-AP-11: Decompose (break down) the steps needed to solve a problem into a precise
sequence of instructions.
1A-AP-14: Debug, (identify and fix) errors in an algorithm or program that includes sequences
and simple loops.
1B-AP-10: Create programs that include sequences, events, loops, and conditionals.
INTERNATIONAL SOCIETY FOR TECHNOLOGY IN EDUCATION (ISTE) STANDARDS
FOR STUDENTS (https://www.iste.org/standards/for-students)
5D: Students understand how automation works and use algorithmic thinking to develop a
sequence of steps to create and test automated solutions.