1
Clear first, GO last
Computing 1: Topic 1.2, pp. 19–32
GoalSay that a program starts with the clear button and ends with GO, and then run it.
New words
run · make the code do its jobpress GO · tell the robot to start its commands
Explanation
A program has a start and an end. We press clear first. This wipes out old commands. Then we press the move and turn buttons. We press GO last. When we press GO, the robot runs the code.
Worked examples
Tom wants the robot to go forward two steps. He presses clear, forward, forward, GO. The robot runs the code and goes two steps.
Lola forgets clear. The robot still has old commands inside. It does the old commands first. That is why we always press clear first.
Yuki programs the robot, but forgets GO. Nothing moves! The robot waits until someone presses GO.
Class activity
Program game: lay out command cards in a row on the floor: clear, forward, turn right, forward, GO. One child is the robot and walks the program when someone says GO. Try again, but leave out the clear card, and talk about why it is useful.
Practice
1
Which button do you press first in a program?
Clear.
2
Which button do you press last?
GO.
3
Which card goes at the end?
GO.
4
Chen presses clear, back, turn left. The robot does not move. What did Chen forget?
To press GO.