CS. Computer Science · Computer Science: Following and Giving InstructionsGiving My Own Instructions
AB SC K: communicate two steps AB SC K: interpret instructionsAbout 25 minutes
Learning goals- I can give two steps in order so someone else can follow them.
- I can use clear words to say what to do.
- I can watch and fix my instructions if they do not work.
Words to know
clear
Easy to understand. Clear instructions say exactly what to do.
code
Instructions written for a computer or robot to follow.
fix
To change something so it works. Coders call fixing instructions debugging.
Now you give the instructions
(Grown-up: read aloud.)
You have followed lots of instructions. Now you can give them!
Good instructions are clear. They:
- say what to do (walk, pick up, clap);
- say how many or where (3 steps, to the door);
- say the order: first, then next.
Robots and computers follow instructions called code. People who write code are called coders. You are practising to be a coder!
A clear instruction says what to do and in what order.Worked exampleHelp the muskrat get home
A muskrat lives in a marsh in Alberta. It wants to get to its lodge, a home it builds from plants and mud. Look at the grid. Give the muskrat 2 steps to get home.
- Find the muskrat: bottom row, at the left.
- Find the lodge: top row, at the right.
- Step 1: go 3 squares right. Now the muskrat is right under the lodge.
- Step 2: go 1 square up. The muskrat is in its lodge!
First go 3 squares right. Then go 1 square up.
The dashed line shows the muskrat's path: 3 squares right, then 1 square up.Worked exampleCode a grown-up robot
Your grown-up pretends to be a robot. Robots only do exactly what they are told. You want the robot to get your teddy from the couch. What 2 steps do you give?
- Think: where is the robot? Where is the teddy?
- Step 1: "Walk forward 4 steps." The robot is now beside the couch.
- Step 2: "Pick up the teddy."
- Check: did the robot get the teddy? Yes!
First walk forward 4 steps. Then pick up the teddy.
1. Walk forward 4 steps.
2. Pick up the teddy.
The robot code: two steps, in order.
Oops! Fix it
Sometimes your instructions do not work the first time. Maybe the robot walks only 2 steps and does not reach the couch. That is okay! Change the instruction ("Walk forward 4 steps") and try again. Coders do this all the time. It is called debugging.
| Not clear | Clear |
|---|
| "Go over there." | "Walk to the door." |
| "Do the thing." | "Clap 2 times." |
| "Get it." | "Pick up the red ball." |
| "Put it somewhere." | "Put the ball in the basket." |
Clear instructions say exactly what to do.Watch and check
After you give an instruction, watch what happens. Did the person do what you wanted? If not, ask: "Did I say it clearly? Did I say the right order?" Then fix it.
Odd factAbout 180 years ago, a woman in England named Ada Lovelace wrote a set of steps for a machine to follow. Many people call her the first computer programmer, and that was long before computers like ours were even built!
Hands-on activityRobot grown-up
- Choose a toy and put it somewhere in the room.
- Your grown-up is the robot. The robot only does exactly what you say.
- Give the robot 2 steps, like "Walk forward 3 steps. Pick up the bear."
- Watch. Did the robot get the toy? If not, fix your steps and try again.
- Switch: now you are the robot!
Safety: Clear the floor of toys and cords first so no one trips. The robot walks slowly. The word "Stop!" always means stop right away. Keep the robot away from stairs, doors and hot things.
Your turn
1What 3 things make an instruction clear?
Say what to do, say how many or where, and say the order.
2Which is clearer: "Get it" or "Pick up the red ball"?
3How did the muskrat get home?
First 3 squares right, then 1 square up.
4What are instructions for a computer or robot called?
5Your robot walked 2 steps but needed 4. What do you do?
Fix the instruction: "Walk forward 4 steps," and try again.
More practice
1Give 2 steps to get a grown-up to sit on a chair.
Answers will vary. Example: "First walk to the chair. Then sit down."
2Make "Do the thing" clear.
Answers will vary. Example: "Clap 2 times."
3What do coders call fixing instructions?
4Who is called the first computer programmer?
Check your understandingQuiz
1. Which instruction is clear?
2. The muskrat is under its lodge. What is the next step?
3. Your instructions did not work. What should you do?
For parents and teachersThe curriculum asks children to communicate a sequence of two steps for a given purpose. Playing "robot" is a classic unplugged coding activity: your child gives the instructions, watches what happens and fixes them if needed.
Help at home:
- Play Robot Grown-Up often. Follow your child's steps exactly, even when they are a little unclear, so they see why clear words matter.
- Draw a simple grid on paper and move a toy along it with "right, left, up, down" instructions.
Common mistakes:
- Vague words like "there" or "it". Ask, "Where is there? What is it?"
- Forgetting to count. Prompt with "How many steps?"