Coding with Loops Worksheet: Mouse to the Cheese
Coding with loops for 2nd grade: write the mouse's code to the cheese with repeat blocks, using at most 6 blocks.
- 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 7 by 7 grid with the mouse, one cookie to collect and the cheese, with three cats, two chairs and two brooms in the way. Each block for the mouse has an arrow box and a number box: right x3 means three squares to the right. The mouse's walk is 13 squares long but fits in 5 blocks, and the sheet gives 6, so kids learn to spot runs of the same arrow. A test line asks them to run the mouse's code with a coin. Page 2 shows a shortest code for the mouse in blocks. This board is also the level "Mouse to the Cheese: Loops" in our free online coding game.
Tips for using it
- Write the mouse's long code first (one arrow per square), then circle runs of the same arrow and turn each run into one block.
- Ask how many arrows the mouse would need without loops: 13!
- Challenge: can your child find another code for the mouse that still fits in 6 blocks?
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.