AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Term 1 review

Week 11 · Review: Term 1 · 3 lessons
2

Plan, code, trace

Computing 1: Topics 1.1–1.4, pp. 9–59
GoalPlan a route in words, write the code, and trace it.
New words
code · commands a robot understandstrace · follow the code one card at a time
Explanation

The floor robot has command cards: forward, back, turn left, turn right, clear, pause and GO. A turn is a quarter turn on the spot. A program starts with clear and ends with GO. Plan in words, change it to code, then trace the code on the grid.

clearforwardforwardturn leftforwardforwardGOGO
Worked examples
Plan: at the zoo, the robot starts top right facing left. It must reach the penguin. Say: forward two, turn left, forward two. Code: X F F L F F GO.
ABCDE4321
Trace: start bottom left facing up. Code: R F F L F. It goes right two, turns left, and goes up one. It ends at C2.
Bug: the robot should reach the giraffe. Code: X R F F GO. It stops one square early. The fix is one more F.
Class activity

Zoo route: draw a grid of squares on paper. Put a start square and a goal such as an elephant. Write a code with clear first and GO last. Swap with a partner. Trace each other’s code with a finger. Do you both end on the goal?

Practice
1
The robot starts at the bottom right facing up. It must reach the lion. Write the code.
2
Trace: start at D1 facing up on a 4 by 4 grid. Code: F L F F. Where does the robot end?
ABCD4321
3
Which button do you press first? Which last?
clear??????GOGO
4
Say this code in words: B R F F.