Ozobot Classroom

Lesson Creator

  • Preparation
  • Direct Instruction
  • Student Practice
  • Supplements
  • Review

1. Tell Us About Your Lesson

All fields are required unless marked as optional

A. Lesson Overview


Students will

B. Lesson Details

Lesson Duration (minutes)The time (minutes) to complete the whole lesson.

Grade LevelsSelect all that apply


Subjects/TopicsChoose the most relevant subject(s). Select up to 3.


    Coding Styles


    Product Lessons


    Tested With

    2. Preparation

    This helps the teacher prepare for the lesson before the class session

    A. Student Materials

    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.

    • Students are not expected to fully understand how functions work by the lesson’s conclusion. Students should leave this lesson understanding that functions are a way to create groupings of code that will be executed in the same way each time. While this lesson does not cover the full aspects of functions, it serves as a scaffold and launching point for students to understand the concept.
    • During this lesson, clarify the difference between loops and functions. Loops consecutively repeat bits of code, while functions repeat bits of code in many different places and must be “called”.
    • The objective of this lesson is to have students take a “high level” action and break it down into “low level” actions. They will be able to execute the function, but won’t necessarily be able to place it and call it within a larger context of code. They will build on their learning in the next lessons when they build functions and include them in their code.

    3. Direct Instruction (Teacher-Facing Instructions)

    These are the steps the educator will read. Include any front loading, modeling or explicit instruction before students work independently or in groups.

    Instruction

    Introduce the concept of a function by asking students to think about their evening routine. With the class, create a list of actions that would be part of an evening routine. An example could be:

    1. Eat dinner
    2. Take a shower
    3. Read a book
    4. Play games
    5. Fall asleep

    Instruction

    Pick one action to extrapolate further on. Ask students to break it down into smaller steps. For example, taking a shower could be broken down into:

    1. Get wet
    2. Wash your hair
    3. Wash your body
    4. Wash your face
    5. Dry Off

    Instruction

    Again, pick one action to extrapolate further on. Ask students to break it down into smaller steps. For example, washing your hair could be broken down into:

    1. Squeeze shampoo into hand
    2. Put shampoo on to hair
    3. Lather
    4. Rinse

    Instruction

    Explain to students that they created a function. Explain that a function is a single name for a set of actions. In this example, the name of the function would be “washYourHair” and the set of actions include:

    1. Wet hair
    2. Squeeze shampoo into hand
    3. Put shampoo on to hair
    4. Lather
    5. Rinse

    Instruction

    Explain to students that in computer science, functions are used to call a group of commands that can be used multiple times and in different places. Explain using the hair-washing analogy. This is a function that a person performs daily, and in different circumstances, such as hotel rooms, locker rooms, and friends' and families' homes.

    Instruction

    Tell students that they will use color codes to create some functions. They will be given some prompts and asked to use color codes to mimic behavior.

    Instruction

    Display the Teacher Example Sheet. Explain to students that the name of the function will be “Pop Star” and ask students how the bot could mimic her movements. Explain that Pop Stars can sing and dance.

    Instruction

    Brainstorm some famous pop stars that students could choose to mimic. Some ideas may include: Beyonce, Justin Timberlake, Lady Gaga. If helpful, choose one star to focus the project on.

    Instruction

    Ask students, “How can we use color codes to write a function with the name, “Pop Star?”

    Instruction

    Display the OzoCodes Sheet. Prompt a discussion around what color codes would mimic dancing.

    Instruction

    Display the Teacher Sample Sheet. Point to the “function name”, and ask students what the name should be (Pop Star). Point to the “behavior” and ask what behavior the Ozobot should display (dancing). Point to the “Color Codes” and ask which codes would make sense for the Pop Star function, and explain that the Ozobot uses tornado, backwalk and nitro boost.

    Note: Students are free to draw their function color code in any shape or form that makes sense to them. In this particular example, there are multiple curves so that each color code is read from right to left. If students understand the concept of symmetric and non-symmetric codes, they can write codes that are read from left to right and won’t be constrained by the direction of the robot.

    Instruction

    Execute the code with the Ozobot. Check for understanding by asking, “Why is this color code a function?” (It has a single name for a set of actions. We can “call” it, or use it again if needed.)

    Instruction

    Explain that this is an example and that students will be creating functions for a racecar, baby, snake, and dog.

    Instruction

    Clarify any directions for the Functions Student Worksheet. Explain to students they can choose color codes that make sense for the behavior they are attempting to mimic. This is intentionally left open-ended so students have creative freedom.

    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

    Look at the “Racecar” function. Record a behavior and three color codes.

    Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)

    Goal

    Instruction

    Draw your color code and execute the function.

    Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)

    Goal

    Instruction

    Look at the “Baby” function. Record a behavior and three color codes.

    Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)

    Goal

    Instruction

    Draw your color code and execute the function.

    Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)

    Goal

    Instruction

    Look at the “Snake” function. Record a behavior and three color codes.

    Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)

    Goal

    Instruction

    Draw your color code and execute the function.

    Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)

    Goal

    Instruction

    Look at the “Dog” function. Record a behavior and three color codes.

    Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)

    Goal

    Instruction

    Draw your color code and execute the function.

    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.

    Instruction

    Using the blank Student Practice Worksheet, create your own function. List its name, behavior, and color codes.

    Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)

    Goal

    Instruction

    Draw the color code and execute the function.

    Please upload any student resources, videos, etc. (Max. size: 512 MB videos, 10 MB all other files)

    Goal

    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.)

    A. Initiate a discussion by asking, “How did you use a color code to create a function?” and “Give an example of a color code you used. How did that color code mimic the behavior you were attempting to display?”

    B. Optional: For students that created their own “pop star” functions, have their Ozobot perform in a “Pop Star” Competition.

    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-11

      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

      Review

      Please review your lesson before submitting.

      Save Draft

      Please login or create an account to access this content and more!

      Login / Create account