Science worksheet · Coding unplugged

Robot Maze

Write the code that takes the robot around the walls of a maze to the star.

Share:
Grade level
Grades 2–4
Time
About 20 minutes
Answer key
Yes, page 2 of the PDF
Kids practice
Coding unplugged, Algorithms, Debugging

What kids do

Printed on the sheet:

  1. Each arrow moves the robot one square: ↑ up, ↓ down, ← left, → right. The robot cannot go through walls.
  2. Write the code to get the robot through the maze to the star.

Teacher tip

Ask kids to count the squares before writing each arrow.

How to use it

  • Act out the code first: one child is the robot, another reads the arrows.
  • Tape a grid on the floor and walk the code.
  • Let partners compare answers and settle any differences with a book or a video.

Watch for

Mixing up the robot’s left and right when it faces down the page. Turn the paper to match.

Talk about it

  • How did you find the bug?
  • What question do you still have?

Take it further

Have kids write a code for a partner to follow on a grid.

US Letter, prints well in black and white. Free for home and classroom use: print as many copies as you need.

More coding unplugged worksheets

See all 200 science worksheets

Share this with a friend or teacher

Free for teachers

Get the free Classroom Drawing Kit

12 printable pages: six step-by-step lessons, a grid activity, draw-and-write sheets and teacher notes, sent with your welcome email. After that, new classroom printables by email.

Keep creating with Kevin

New book announcements and free drawing and coloring activity pages, delivered by newsletter.