2. Preparation
This helps the teacher prepare for the lesson before the class session
B. Background Knowledge (Optional)
C. Lesson Tips (Optional)
Add tips for the educator that don't fit into Direct Instruction or Student Practice. You can always return to this page to add more.
Optionally, use the Activity Sheet with each lesson for students to create a computer science journal or as a formal assessment after the activity.
This lesson works in both Ozobot Blockly (Evo only) or the Ozobot Editor (Evo and Ari).
If you are using Evo with Blockly, create your program at https://ozoblockly.com/editor. The sample solution can be accessed here: https://ozo.bot/b/yedxxm or use Share Code yedxxm
If you are using Ari or Evo with the Ozobot Editor, create your program at https://editor.ozobot.com/blockly The sample solution can be accessed using https://editor.ozobot.com/blockly?programId=rw2k9fw or use Share Code 3n9szii
4. Student Practice (Student-Facing Instructions)
These are step-by-step instructions delivered directly to the students as they work independently or in groups
Student Instructions
Instruction
Use colors to get familiar with conditionals in computer science. You will program your bot to complete different actions based on the different colors it senses. A conditional in computer science is a feature of a programming language that performs different outcomes or actions depending on whether a certain condition is true or false. Simply put, a conditional is if/then logic similar to cause and effect. A conditional can also be called a conditional statement, conditional expression, or conditional construct.
Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)
Goal
Instruction
To begin, draw a colored pathway for your bot to move along. The pathway will have the colors white, red, green, and blue on it. The colors can be put in any sequence or order.
First, use your pencil to draw the outline of your pathway. Make sure the pathway is wide enough for your bot to fit inside.
Then, use your red, blue, and green markers to add colored parts or sections along the pathway. The colored parts should be about half an inch wide. The correct size of the parts can be made by coloring four lines next to one another using the entire edge of the marker tip. Remember to leave parts of the pathway white.
Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)
Goal
Instruction
Build a program for your bot to complete different actions based on the color it senses. The colors in your program are conditions. The colors in your program can and will change. The first condition is the color white. When your bot senses the color white, it will move forward one step at a time. You will use conditionals to program the action to occur. A conditional or if/then statement performs different outcomes or actions depending on whether a certain condition is true or false.
Begin building the program. Open up OzoBlockly and click on Level 3. Then, go to Logic in the block panel. Click the "if surface color is red, do...else..." and drag it onto your workspace. Next, click on the red square inside the block and select the color white. Finally, go to Movement in the block panel. Click the "move forward 1 step medium" block and drag it into the conditional block after the word, do.
Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)
Goal
Instruction
Now, complete the first conditional statement, by adding your second condition, the color green. When your bot senses the color green, it will skate forward slowly.
Go back to Logic in the block panel. Click the "if surface color is red, do...else..." and drag it into the conditional block after the word, else. Next, click on the red square inside the block and select the color green. Then, go to Movement in the block panel. Click the "skate medium forward" block and drag it into the conditional block after the word, do. Finally, use the drop-down menu on the block to change the block to "skate slow forward."
Your program is still incomplete because your statements are nested. The statements are nested because one statement is contained inside the other.
Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)
Goal
Instruction
Add your third condition, the color blue. When your bot senses the color blue, it will spin and move forward.
Go back to Logic in the block panel. Click the "if surface color is red, do...else..." and drag it into the conditional block after the word, else. Next, click on the red square inside the block and select the color blue. Then, go to Movement in the block panel. Click the "spin left" block and drag it into the conditional block after the word, do. Finally, click the "move forward 1 step medium" block and drag it below the "spin left" block inside the conditional block.
Your program is still incomplete because your statements are nested. The statements are nested because one statement is contained inside the other.
Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)
Goal
Instruction
Onto the fourth and final condition, the color red. When your bot senses the color red, it will light up like a disco ball and move forward.
Go back to Logic in the block panel. Click the "if surface color is red, do..." and drag it into the conditional block after the word, else. Next, go to Light Effects in the block panel. Click the "Disco" block and drag it into the conditional block after the word, do. Finally, go to Motion in the block panel. Click the "move forward 1 step medium" block and drag it below the "disco" block inside the conditional block.
All of the nested statements in your program are now complete.
Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)
Goal
Instruction
Complete the program and test it! In order for a conditional to continuously be checked, you will need a forever loop. Otherwise, when you run the program, the bot will quickly check if it senses a certain color and nothing will happen.
Go to Loops and click on a "repeat forever do" block. Drag the block above the "if surface color is white do" block to wrap the loop around the entire sequence.
Then, place your bot on one end of your pathway and run your program. Watch your bot as it completes a sequence of actions based on the condition or color it senses on the pathway.
Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)
Goal
Instruction
The program you created uses color as a condition.
Change the colors in the "if surface color is" blocks to program your bot to complete a different sequence of actions. First, click on the white square in the first "if surface color is" block and choose either red, green or blue. Then, click on the second, third, and fourth "if surface color is "blocks in order and choose a different color.
After you have changed all four colors, run your program again. Your bot will now complete a different sequence of actions.
Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)
Goal
Instruction
Check your work.
Does your program have four different conditionals?
Does each conditional statement have a different color?
Are the conditional statements correctly nested?
Does your program have a forever loop?
Does your bot follow the colors to demonstrate different sequences in action?
Looking for more?
- Change the colors again in your program to see a different sequence of actions.
- Add the "say color" block from the Sounds category to program your bot to say the color it senses on the pathway aloud.
- Use different blocks from the Movement and Light Effects categories to change the actions inside each conditional.
Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)
Goal
Lesson Extension (Optional)
Add student instructions for a lesson extension.
5. Supplements
A. Lesson Closure (Optional)
Give tips for how to wrap up the lesson and assess student learning. (Want to add an attachment? Use Part C, below.)
B. Academic Standards (At least one standard required)
Choose a category from the dropdown on the left. In the blank on the right, begin typing the number of the standard.
csta-1b-ap-10 ✖iste-1-d ✖
C. Add Other Attachments (Optional)
Please upload any student handouts, videos, sample solutions, etc. (Max. size: 1 GB videos, 10 MB all other files)
Add Cover Image