Lesson Modules
Teaching Tips:
Introducing the Lesson (2 minutes)
This lesson is an introduction to all number-based games. Before running the program, it might be a good idea to refresh students’ memory of the comparison operators (<, > and =). Some students remember this by thinking of the operators as an alligator who wants to eat the bigger number.
Introducing the Game (3 minutes)
This game is a normal number guessing game. The robot will think of a number and you have to try to guess that number in as few tries as possible. Spend a few minutes having students play this game with each other before they play with the robot. This way they have a better understanding of, and recent experience with, the game.
Play the Game! (20 minutes)
Have a student volunteer read through the questions on the Play The Game! page out loud to the class. Discuss the meaning of each question to ensure students understand what they are being asked.
Have students play the game and answer the questions. They should work as a group to do this investigation. Only the Investigation Robot Master should control the robot.
Discuss student answers as a class.
Explain the Game! (10 minutes)
Have students write a full user-side walk through of the game on the Explain The Game! page.
Have a few students volunteer to read their write-ups to the class. It might be wise to pre-select students as they are writing by reading a little over their shoulders and selecting write-ups that will spur discussion.
There are some concepts in this lesson, however, that students will struggle with and may need extra guidance to understand fully. In particular, we believe that students will struggle with understanding why you need to convert a string type variable to a number. Shouldn’t the computer just know that “9” means 9? You have to explain to them that it doesn’t. There are many different variable types: strings (text), integers (counting numbers and their negatives), floats (decimals) and boolean (True, False). The robot needs to be told what type of data it is dealing with so that it deals with it appropriately. In Choregraphe there is one more, “bang” that signals boxes to begin their function. Most other programming languages do not have this type.
Questions to Prompt Student Learning - Day 1
- Break it down! What happens when the path splits?
- What would happen if you showed the robot stegosaurus instead of a number card?
- Can the robot pick a number, not between 1 and 10?
- When does the program end?
- What are the three possible outcomes when you play this game?
- Play the number guessing game with a friend/peer. What do you think about when your friend guesses a number?
Resources:
- Book for students
- Book for teachers
- All the resourses for this course Module3_ChoregrapheFiles
- Download Lesson2_Choregraphe File Number Game
Introduction
PLAY THE GAME!
Read the questions on this page.
Play with the robot while it is running the example program (Number Game). As you interact with the robot, answer the questions below. Use complete sentences.
Write a description of the game in the space below. Describe everything you saw Nao do.
Use complete sentences.
Teaching Tips:
Explain the game! (10 minutes)
Students open the game file on their own computers and look through the code while answering questions on the Read The Code! page.
What do these do? (15 minutes)
In each lesson, there is one Black Box, a Choregraphe box that has an unknown function. These boxes are indicated by a "?" icon. Students must identify these boxes and list the inputs, outputs and deduce the function of this box in the What Do These Do? page. This is the central focus of learning in each lesson. Students must reason through the program to figure out what exactly these boxes do. They MUST understand the box before moving on to the next stage.
Discuss functions as a class.
Leading the Discussion - Day 1
In general, students should be the main contributors to the discussion. As the teacher, you should ask questions to facilitate discussion and guide the discussion in the correct direction. Sample questions are provided below.
are some concepts in this lesson, however, that students will struggle with and may need extra guidance to understand fully. In particular, we believe that students will struggle with understanding why you need to convert a string type variable to a number. Shouldn’t the computer just know that “9” means 9? You have to explain to them that it doesn’t. There are many different variable types: strings (text), integers (counting numbers and their negatives), floats (decimals) and boolean (True, False). The robot needs to be told what type of data it is dealing with so that it deals with it appropriately. In Choregraphe there is one more, “bang” that signals boxes to begin their function. Most other programming languages do not have this type.
Questions to Prompt Student Learning - Day 1
- Break it down! What happens when the path splits?
- What would happen if you showed the robot stegosaurus instead of a number card?
- Can the robot pick a number, not between 1 and 10?
- When does the program end?
- What are the three possible outcomes when you play this game?
- Play the number guessing game with a friend/peer. What do you think about when your friend guesses a number?
READ THE CODE!
Open the file NumberGame.pml. Read through the program and detail the function of each branch after the Wake Up and Load Vision boxes.
The three Animated Say boxes at 4 say:
Question 4.1:
Question 4.2:
Question 4.3:
Look at the NumberGame.pml program and identify the "?" boxes. For each input/output port write its Name and Function.
Teaching Tips:
Brainstorm (10 minutes)
Students brainstorm alternative uses of the new Black Box and write/draw their ideas on the Brainstorm! page. Give students 2-3 minutes to brainstorm silently. The have them discuss their ideas with a partner for 2-3 minutes and finally discuss ideas as a group for 5 minutes. This discussion method is called Think-Pair-Share.
Build it out (30 minutes)
Have the students pick one of their ideas and construct a full plan on the Build It Out! page.
Have the students carry out the plan by programming it on their own computers. They should test whatever they can on the virtual robot before running it on the real robot.
Leading the Discussion
In general, students should be the main contributors to the discussion. As the teacher, you should ask questions to facilitate discussion and guide the discussion in the correct direction. Sample questions are provided below. There are some concepts in this lesson, however, that students will struggle with and may need extra guidance to understand fully. In particular, we believe that students will struggle with understanding why you need to convert a string type variable to a number. Shouldn’t the computer just know that “9” means 9? You have to explain to them that it doesn’t. There are many different variable types: strings (text), integers (counting numbers and their negatives), floats (decimals) and boolean (True, False). The robot needs to be told what type of data it is dealing with so that it deals with it appropriately. In Choregraphe there is one more, “bang” that signals boxes to begin their function. Most other programming languages do not have this type.
Questions to Prompt Student Learning (Day 2)
- What do you want to happen first in your game? Then what?
- What cards are you going to use in your game?
- What do you want the robot to say when she recognizes this card?
- Are you planning any custom movements, sounds or LEDs?
The Black Box 1 in this program is a Text to Number box. It takes the text from the vision recognition box (the name of the card) and converts it into a number.
The Black Box 2 is a Relation box. It determines if the top input is greater than, equal to or less than the bottom input.
In what other programs could these boxes be used? List as many ideas as you can think of! Write your ideas in the idea clouds below.
Your ideas can be words, sentences or drawings. Just make sure you can explain them!
Choose one of your ideas from brainstorm and plan your program here.
The main idea for your game:
Use a piece of paper to write what cards are you going to use and the reason why you choose those boxes

Teaching Tips:
Reflect and Revise (15 minutes)
When students finish making their program, have them complete the Reflect and Revise! page. They should consistently reflect on their work and revise until they have a program that they are happy with (or they run out of time).
Today I learned... (5 minutes)
Have the students complete the Today I Learned... page.
Leading the Discussion
In general, students should be the main contributors to the discussion. As the teacher, you should ask questions to facilitate discussion and guide the discussion in the correct direction. Sample questions are provided below. There are some concepts in this lesson, however, that students will struggle with and may need extra guidance to understand fully. In particular, we believe that students will struggle with understanding why you need to convert a string type variable to a number. Shouldn’t the computer just know that “9” means 9? You have to explain to them that it doesn’t. There are many different variable types: strings (text), integers (counting numbers and their negatives), floats (decimals) and boolean (True, False). The robot needs to be told what type of data it is dealing with so that it deals with it appropriately. In Choregraphe there is one more, “bang” that signals boxes to begin their function. Most other programming languages do not have this type.
Questions to Prompt Student Learning (Day 2)
- What do you want to happen first in your game? Then what?
- What cards are you going to use in your game?
- What do you want the robot to say when she recognizes this card?
- Are you planning any custom movements, sounds or LEDs?
AFTER CLASS
- Save the students’ work on the flash drive.
- Pack up everything (Check the packing instruction).
DO, REFLECT & REVISE!
Build your program in Choregraphe. When you test it, record what happens here.
Answer the questions below.
- Save your work on the flash drive from your teacher.
- Help your teacher pack up everything with an extreme care when handling robots, computers, and routers.