Debug the Loop Code: Bunny to the Carrot
Debug the loop code: one of the 6 repeat blocks that should take the bunny to the carrot 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 strawberry to collect and two rocks, two trees and two mushrooms. The bunny's code is written in loop blocks and exactly one block is wrong, its arrow or its repeat number. Kids follow the bunny'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 bunny. The key marks the bunny's bug and draws the working path. This board is also the level "Bunny to the Carrot: Loops" in our free online coding game.
Tips for using it
- Check each of the bunny's blocks in two steps: first the direction, then the count.
- After fixing it, ask your child to break the bunny's code on purpose for you to debug.
- Unroll the bunny'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.