a1tD0000007kcu2IAA

Course: Introduction to Programming with Ozobot
3) Logic

  • 5-12 grade
  • Intermediate

Lesson Description:

Students learn about logic blocks and then apply it to their code to…
1)    Program Ozobot to solve a maze using logic blocks.
2)    Create a maze that a programmer would need to use logic blocks to solve.
 

image description

Lesson Modules


Teaching Tips:

This lesson will take about 2 hours to complete. You may have to split the lesson into multiple classes.



Many of the activities in these lessons exist in the examples section of the right toolbar. In this section, you can click the button “open example” and a successful code for that activity will automatically load onto the workspace. If students do this then they are not problem solving and learning how to program. Try to reduce the risk of students using the tutorial page to build their program.


Materials:


• One Ozobot per student/group (suggestion: 2-3 students per group)
• One computer for each student/group
• Teacher computer
• Internet connection
• Projector
• Color printer
• Blank white printer paper
• Ozobot Markers

Preparation:


• Make sure Ozobots are charged before beginning the lesson
• Print ONE color copy of the Avoid Red Maze
• Print ONE color copy of the Escape Maze for EACH group/student
• Print ONE color copy of the Find the colors for EACH group/student

Observation activity:
Have students go to their computers and answer the following questions.

1) Imagine someone knocks on your door. When you open the door you see your best friend. What is the first thing you do?

2) Imagine someone knocks on your door. When you open the door you see your neighbor. What is the first thing you do?

3) Imagine someone knocks on your door. When you open the door you see a stranger. What is the first thing you do?


Have students go to their computers and answer the questions. Once all of the students have submitted their responses, facilitate a class discussion about their answers.

In this section we will begin to think about how we make decisions based on the input - much like logic blocks do in programming.

Imagine someone knocks on your door. When you open the door you see your best friend. What is the first thing you do?

Imagine someone knocks on your door. When you open the door you see your neighbor. What is the first thing you do?

Imagine someone knocks on your door. When you open the door you see a stranger. What is the first thing you do?


Teaching Tips:

1) Show the students’ goals on the class view.
2) Show the image of the logic blocks. Facilitate a discussion where students predict what the blocks do.
3) Show the video on the class view
4) Use the observation activity again, but this time connected with logic blocks. Facilitate a conversation with your students connecting the two.
5) Have students answer the questions on their computer.


a) If the weather report said it was going to be hot, I would wear…. (answer using only ONE word)
b) If the weather report said it would rain, I would wear…. (answer using only ONE word)
c) If the weather report said it would be cold, I would wear…. (answer using only ONE word)


6) Once the students have finished responding, on the class view you can click the “show results” button under each question. This will show the students’ responses in a word cloud which has the more often used words are larger. Facilitate a conversation about their responses.
7) Show the next example on the class view (if it is raining do wear rain boots else wear sneakers).
8) Have students create their own if…do…else conditional statements.
9) Have students share their if…do….else conditional statements with the class.
10) Show the next section of the class view (leveling up). As a class quickly celebrate this.
11) As a class create a program that which programs Ozobot to avoid the red lines on the "Avoid Red" maze. 

a) Open Ozoblockly.com
b) click “Get Started”
c) Exit out of the pop up if one shows up
d) Select the correct Ozobot (bit or evo)
e) Select level 3

Have students make suggestions on how to build the program. Encourage them to make changes, explain why they think a specific decision should be made, etc.

Here is a program that solves the maze:

Test and change the code until the goal is reached.

12) Follow the class view to support your students’ understanding of nesting. Tell the students that at this point their programming is not complex enough to NEED to nest their programming, but more advanced programmers DO need to use nesting therefor it would be beneficial for them to begin growing their skills.

In this section we will learn how logic blocks work.




If the weather report said it was going to be hot, I would wear…. (answer using only ONE word)



If the weather report said it would rain, I would wear…. (answer using only ONE word)



If the weather report said it would be cold, I would wear…. (answer using only ONE word)



Teaching Tips:

Show the students’ 1st goal on the class view: Program Ozobot to solve a maze using logic blocks.


Pass out both mazes to each student/group:

Find the colors

Escape Maze

During the design time, walk around and prompt your students with questions to help deepen their learning and thinking process. Some examples of questions are:

Why did you make that design decision?
What do you predict your code will do?



Here is an example of a working code for the "Find the Colors" maze.


Here is an example of a working code for the "Escape Maze"



Show the students’ 2nd goal and challenge on the class view.

Goal: Create a maze that a programmer would need to use logic blocks to solve.

Challenge:  Solve one of your classmate’s mazes through logic blocks.

In this section we will program Ozobot to solve 2 mazes using logic blocks, then create our own maze and see if our classmates can solve it.


Teaching Tips:

Have students answer the following questions on their computers. Once all the students have finished answering the questions have a class discussion about their answers.
1. Explain logic blocks.
2. What is the most challenging part of maze solving? Explain how you overcame that challenge.
3. What do you want to make Ozobot do next?


Have students plug their Ozobots into their chargers.

In this section we will reflect on our learning.


Explain logic blocks.

What is the most challenging part of maze solving? Explain how you overcame that challenge.

What do you want to make Ozobot do next?


Plug your Ozobot in so it will be ready for you to use next time.