Robot World
Guide a friendly robot using directions, sequences, loops and debugging.
Start learning โDirections
A robot needs exact instructions. Up moves one square toward the top; right moves one square across. Predict where each command will take it.
Try it: Try a route with two commands, then compare your prediction with the robotโs position.
Stretch challenge: Plan a route to the star using no more than six commands.
Sequences
The order of commands matters: up then right is not the same journey as right then up when obstacles are present.
Try it: Write a sequence and explain why you chose its order.
Stretch challenge: Reach the star without touching a wall.
Loops
A loop repeats a group of instructions. Instead of writing RIGHT four times, we can say REPEAT 4 RIGHT.
Try it: Find a repeated movement in your route.
Stretch challenge: Complete a route with fewer written commands.
Decisions
A condition chooses an action based on what is true: IF the square ahead is blocked, turn.
Try it: Explain what a robot should do when a path is blocked.
Stretch challenge: Create two routes for two different obstacle maps.
Debugging
A bug is a mistake in instructions. Check the first place your prediction differs from the result and fix one step.
Try it: Run a route, find the first wrong step, and change it.
Stretch challenge: Reach the star, then improve the route.
Try it yourself
Make it your own
Reach the star, then improve the route. Explain what you tried, what happened and what you would improve.
Open My Creations โ