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

Term 2 review

Week 21 · Review: Term 2 · 3 lessons
3

Robots and drawings

Computing 2: Units 5–8, pp. 66–121
GoalReview how a robot with a marker follows an algorithm to draw a shape.
New words
marker down · the robot draws a line as it movesrepeat · to do the same steps againback · one step the other way, without turningtrace · to follow the steps one by one to see what they do
Explanation

A robot with a marker draws what its algorithm tells it to draw. The algorithm starts, puts the marker down, moves and turns, and stops. Forward goes the way the robot faces. Back goes the other way without turning. Turn left and turn right are quarter turns on the spot. A repeat makes an algorithm shorter. We trace an algorithm to find bugs.

Worked examples
The letter G, drawn by the robot above. It starts at the top right, facing left. Algorithm: start, marker down, forward 2, turn left, forward 4, turn left, forward 2, turn left, forward 2, turn left, forward 1, stop. That is 12 steps.
A rectangle has a pattern, so it can use a repeat: repeat 2 times: forward 2, turn right, forward 3, turn right. The robot starts at the top left, facing right.
ABCD4321
A robot starts on D1, facing left. It does forward 3, turn right, forward 2 and back 1. It stops on A2.
Class activity

Robot show: in pairs, plan the letter G on a grid of 3 columns and 5 rows. Write the algorithm and count the steps. Trace it with a pencil. Then one partner walks it on a chalk or tape grid while the other reads the steps. Is there a pattern for a repeat? If not, why not? Swap roles with another shape.

Practice
1
Write the short version: forward 3, turn left, forward 3, turn left, forward 3, turn left, forward 3, turn left.
2
The algorithm should draw a hook: start, marker down, forward 3, turn right, forward 2, turn right, forward 2, stop. What does the robot draw, and which step has the bug? The star shows the end it should reach.
3
Count the steps: start, marker down, repeat 3 times: forward 2, turn right, forward 1, turn left, stop.
4
A robot starts on C1, facing up. It does forward 2, turn left, forward 2 and back 1. Which square does it stop on?
ABCDE4321