Similar presentations:
Let’s Review…
1. Let’s Review…
1. What is the name of the block weuse to make loops?
2. What is a nested loop?
3. True or False: It’s important to
know the sequence of events
before building a loop.
4. What is the difference between a
repeat loop and a conditional
loop?
1
2. Coding Fundamentals
Gray Wolves3.
4. Important Vocabulary
There are some important things for us to understand before webegin playing– let’s review some concepts first!
Loop
Nested Loop
Conditional
a structure that repeats a
set of instructions
(algorithms) until it is told
to stop
a loop
within a loop
an action that occurs if
something specific
happens
4
5. New Coding Blocks
There are some new coding blocks we will use in this lesson today!While
repeats the code if a defined condition
is met
This is a negative condition–
hence you will see the “not”
inside of the loop.
5
6. Goal for the day
We have received reports of a wolf packhanging around a nearby farm. The farmers
are concerned that the wolves will attack
their livestock. We need to help secure the
livestock in a safe way to protect the
livestock AND the wolves as well!
We will continue to work with loops and
nested loops. Today, we will add in a
conditional that will cause the Agent to be
selective, make choices, and take action
based on certain conditions.
6
7. Gray Wolves
This is your spawn point,the location where you
begin game play.
7
8. Talk to Dr. Barwin
This is the pop-up screen we willsee on our screen.
When there is a longer message,
we will see a bar on the side. We
will need to slide the bar down to
read the rest of the message.
Remember, you can use the Immersive Reader feature if you
need help reading the words.
After reading/listening to the
message, click the “I’m ready”
button.
8
9. Gray Wolves
910. Coding Activity #1
Step 1: Read the coding task.Step 2: Use the MakeCode
blocks from your toolbox. You
will drag and drop them into
the coding canvas.
• What blocks do we need?
• What order should the
blocks be in?
Step 3: Press the green start
arrow to test your code.
10
11. Test Your code
1112. Coding Activity #1
1213. Walk over to the next area
1314. Coding Activity #2
1415. Coding Activity #2
1516. Test Your Code
1617. Finish the code
The goal is to reach the gold pressure plate in theback of this grassy area.
This is an aerial perspective of the grassy area.
Consider how to finish the program based on this
layout.
17
18. Coding Activity #3
1819. Coding Activity #3
Step 1: Read the coding task.Step 2: Use the MakeCode
blocks from your toolbox. You
will drag and drop them into
the coding canvas.
• What blocks do we need?
• What order should the
blocks be in?
Step 3: Press the green start
arrow to test your code.
19
20. Coding concept: Conditional
What it meansThe Agent will be selective, make choices,
and take action based on the specified
conditions.
Let’s think about it
Imagine you are taking a walk outside to
pick flowers.
This time you have decided to ONLY pick
daisies.
As you walk (one action), you are picking
flowers (another action), if you see a
dandelion (do NOT pick it), if you see a daisy
(then you do pick it).
21. Test Your Code
If your code runs correctly,you will see the “Activity
Complete” message.
Also, when you walk over
the tripwire, you should
hear the bell ring!
21
22. Coding Activity #4
2223. Coding Activity #4
Step 1: Read the coding task.Step 2: Use the MakeCode
blocks from your toolbox. You
will drag and drop them into
the coding canvas.
• What blocks do we need?
• What order should the
blocks be in?
Step 3: Press the green start
arrow to test your code.
23
24. Test Your Code
2425. Success!
2526. Recap
What you’ve done today:Used the coding concepts of
loops, nested loops, and
conditionals to complete tasks.
Tested and debugged my code.
Embraced a coding mindset!