>> Chomperbot: The sun has returned, and so have I, your favorite podcast hosting robot Chomperbot, here with more Chompers.
Start brushing on one side of the top of your mouth, and brush the inside, outside and the chewing side of each tooth.
>> KIDS: 3, 2, 1 brush!
>> Chomperbot: Today we have some special I Spies for you. I will describe a word used to write code and you have to guess what it is. Instead of I Spy, I’m calling it “iCode”, because I’m very good at human jokes, [RIMSHOT]. Here’s your first one:
This is the term for ONE instruction, one step in a set of directions. This word is the building block of all code.
What word is this? What do iCode?
Switch your brushing to the other side of the top or your mouth, and don’t forget your molars in the way back.
>> GROUP:: A Command!
>> Chomperbot: A Command.
A Command is one instruction you give to a computer.
Let’s use walking as an example. If I was writing code to teach a robot how to walk, my first command would be “Step forward with your right foot”. [TYPING SERVO] My second command would be “Step forward with your left foot”. [TYPING SERVO] Each step is its own COMMAND.
Your next COMMAND is to switch your brushing to the bottom of your mouth. And don’t forget your front teeth!
Ready for your next iCode?
When I’m walking, I do the same thing every time - I move one foot, and then the other. We know those steps are like the COMMANDS we give computers.
But what is it called when you do several steps - when you follow several COMMANDs - the same way every time? In coding, what is it called when you GROUP commands together?
I’ll tell you after you switch your brushing to the other side of the bottom of your mouth, and keep brushing!
So, what word is this? What do iCode?
The answer is…
>> GROUP:: a FUNCTION!
>> Chomperbot: A function is a group of commands we do the same way every time. So if I want my robot to walk, instead of giving it every single command -- move one foot, move the other foot, move one foot, move the other foot, instead I would teach my robot the FUNCTION of “walking” Then I can just code “WALK” to save time!
That’s it for my morning iCode function. I’m all out of commands to give you! But come back tonight for more coding tricks.
>> KIDS: 3, 2, 1 spit!!