Computer science
How does a robot vacuum clean the whole room?
Nobody wrote "go left, go right" for every tile. Someone wrote a few lines and told the robot to repeat them.
In this lesson
A 6 × 4 room. The robot starts top left.
Your notebook page
- A loop repeats a block of lines.
- Same program, any size of room.
- Count moves, not tiles.
- Off by one = bump.
Where you'll see it today
A robot vacuum, a lawn mower robot, your chat app drawing every message on screen.
The course
Inside your phone
Every lesson adds a part. Finish them all to build the Phone.
