Sequencing with arrows

Computer Science · Key Stage 1 · The School

Four simple commands

A simple floor robot understands four commands. FORWARD. BACK. TURN LEFT. TURN RIGHT. Each command does exactly one thing. String several together and the robot follows them one after another, in order, without skipping any.

Planning with arrows on paper

Before touching the robot, draw arrows on a grid. An arrow up means forward. An arrow curving right means turn right. Drawing the path first lets you check it for mistakes. Fixing an arrow on paper is much faster than fixing a robot that has already crashed into a wall.

Predicting the finish square

Look at three arrows: forward, forward, turn right. Before pressing go, guess where the robot will end up. Trace it with your finger first. Then run it and check. Getting it right means you really understand the sequence, not just the individual arrows.

Same arrows, different order

Take the same three arrows: forward, forward, turn right. Now swap the order: turn right, forward, forward. The robot ends up in a completely different square, facing a different way, even though it used exactly the same three arrows. Nothing about the arrows themselves changed. Only their ORDER changed, and that was enough to send the robot somewhere else entirely.

Checking your plan works

After planning a path, test it in small chunks. Run the first two arrows. Check the robot is where you expected. Then add the rest. Testing as you go catches a wrong arrow early, before it is buried under five more commands.

The School — all subjects · Knowledge map