Science worksheet · Coding unplugged

Find the Bug

The robot’s code has one wrong arrow. Follow it, find the bug and fix it.

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

What kids do

Printed on the sheet:

  1. A mistake in code is called a bug. Fixing it is called debugging. Follow this code with your finger.
  2. One arrow sends the robot the wrong way.
  3. Follow the code from START. Find the step that goes wrong.
  4. The bug is in step number
  5. The arrow should be

Teacher tip

Read the code out loud as a class, step by step.

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?
  • How could we find out if that is true?

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.