Debug the Loop Code: Puppy to the Bone
Debug the loop code: one of the 5 repeat blocks that should take the puppy to the bone has a wrong number. Find it and fix it.
- Size
- US Letter (8.5 × 11 in), fits A4
- 2 pages: the worksheet and its answer key; high-resolution, prints sharp on US Letter and A4
- Level
- Grade 2
- License
- Free for personal & classroom use
About this worksheet
A 2nd grade debugging page on a 7 by 7 board with a ball to collect and two benches, two trees and a bike. The puppy's code is written in loop blocks and exactly one block is wrong, its arrow or its repeat number. Kids follow the puppy's blocks square by square, circle the wrong one, write the right block and say what went wrong. Our program checked that a single change is the only fix for the puppy. The key marks the puppy's bug and draws the working path. This board is also the level "Puppy to the Bone: Loops" in our free online coding game.
Tips for using it
- Check each of the puppy's blocks in two steps: first the direction, then the count.
- After fixing it, ask your child to break the puppy's code on purpose for you to debug.
- Unroll the puppy's blocks into single arrows on scrap paper if the loops feel hard.
Printing tips
Download the PDF and print at 100% (or “fit to page” on A4). Page 1 is the worksheet and page 2 is the answer key with the answers in red; print just page 1 if you want to keep the answers for checking. Free for personal, family and classroom use.