Year 5 - Lesson 1
(Time)
Learning Intention
- I can program a robot to say the date and time
Introduction
What do you know about Ohbot? What code have you written for Ohbot in Year 3 and Year 4? This week we are going to be looking at how to make Ohbot speak and use some operators that report the date and time using a variable called current that’s built in to the Ohbot program.
Look at your computer. What current information can you see displayed? In the bottom right is the current time. We can write some code to make Ohbot say the current time and date. The sound will work best through the headphones.
What do you know about Ohbot? What code have you written for Ohbot in Year 3 and Year 4? This week we are going to be looking at how to make Ohbot speak and use some operators that report the date and time using a variable called current that’s built in to the Ohbot program.
Look at your computer. What current information can you see displayed? In the bottom right is the current time. We can write some code to make Ohbot say the current time and date. The sound will work best through the headphones.
Teacher Input 1
Can you experiment with instructions from the Speech palette to make Ohbot talk? Write a program in which Ohbot talks. We will now work together to make Ohbot say the year. We need to start with the say until done instruction, then we need to go to the Sensing palette and scroll down to find the current variable. The current variable has a drop down menu and we need to select the ‘year’.
Can you experiment with instructions from the Speech palette to make Ohbot talk? Write a program in which Ohbot talks. We will now work together to make Ohbot say the year. We need to start with the say until done instruction, then we need to go to the Sensing palette and scroll down to find the current variable. The current variable has a drop down menu and we need to select the ‘year’.
Ohbot will now say the year. However, if we go to the Operators palette and drag a join operator we can add our own text before the year. We can now use this program as a skeleton to say other current pieces of information. Children to now work through tasks on slides.
Activities
1. Can you write some code to say the time, which includes the hour, minute and second?
1. Can you write some code to say the time, which includes the hour, minute and second?
Extension
Can you write some code to say the day name, date, month name and year?
Can you write some code to say the day name, date, month name and year?
Plenary
Look at examples of the children’s coding. Were they successful? Did they need to debug their code? Is everyone’s code the same?
Look at examples of the children’s coding. Were they successful? Did they need to debug their code? Is everyone’s code the same?