Math · 1st Grade · ages 6–7
Coding and Decoding a Path: 1st Grade Math Practice

One arrow, one square: code, decode, fix.
7 practice questions with answers, to do here or to print (the first 4 with no account).
Nina and Milo explain this topic step by step in the Nina & Milo app: animated lessons, practice and games for grades 1 to 5. Create an account
What your child practices
- know that one arrow moves the robot just one square, and read a program in order
- code a path to the gift without touching the rocks
- find and fix a bug in a program
Key ideas to remember
Review the lesson in one minute
One arrow, one square
An arrow moves the robot just one square: up, down, left or right.
Decoding
A program is a list of arrows. I read it in order, one square for each arrow, to find where the robot ends up.
Coding
To code a path, I choose the arrows in order, going around the rocks. More than one path can work.
The bug
A bug is a mistake in the program. To fix it, I follow the robot square by square and replace the wrong arrow.
Practice questions
Answer, then press “Check.” A hint is there if you need it; the answer is explained after you check.
1 Sort each item into the right column.
| Up | Down | Left | Right | |
|---|---|---|---|---|
| ➡️ | ||||
| ⬇️ | ||||
| ⬆️ | ||||
| ⬅️ |
Answer: ➡️ → Right · ⬇️ → Down · ⬆️ → Up · ⬅️ → Left
The up arrow goes in the Up box, the down arrow in Down, the left one in Left, the right one in Right.
2 🤖 follows the code: ⬆️ (one arrow = one square). Which square does it end up on? Square A, B or C?
Answer: Square A
3 🤖 follows the code: ⬅️ (one arrow = one square). Which square does it end up on? Square A or B?
Answer: Square A
4 🤖 follows the code: ⬆️ ⬅️ ⬆️ ⬅️ (one arrow = one square). Which square does it end up on? Square A or B?
Hint
Move one square for each arrow, from the first to the last.
Answer: Square A
5 Sort each item into the right column.
| Up | Down | Left | Right | |
|---|---|---|---|---|
| ➡️ | ||||
| ⬇️ | ||||
| ⬅️ | ||||
| ⬆️ |
Answer: ➡️ → Right · ⬇️ → Down · ⬅️ → Left · ⬆️ → Up
The arrow that points up goes in the Up box. The one that points down goes in Down. The left one in Left. The right one in Right.
6 🤖 follows the code: ⬆️ ⬅️ ⬅️ ⬇️ ⬇️ (one arrow = one square). Which square does it end up on? Square A, B or C?
Answer: Square C
7 Match each word to what it means.
an arrow →
a program →
a bug →
Match with: is read in order · is a mistake · moves one square
Hint
How many squares does one arrow move? In what order do we read a program?
Answer: an arrow → moves one square · a program → is read in order · a bug → is a mistake
Here are the right matches: an arrow, one square; a program, in order; a bug, a mistake.
Answer key
- Question 1. ➡️ → Right · ⬇️ → Down · ⬆️ → Up · ⬅️ → Left — The up arrow goes in the Up box, the down arrow in Down, the left one in Left, the right one in Right.
- Question 2. Square A
- Question 3. Square A
- Question 4. Square A
- Question 5. ➡️ → Right · ⬇️ → Down · ⬅️ → Left · ⬆️ → Up — The arrow that points up goes in the Up box. The one that points down goes in Down. The left one in Left. The right one in Right.
- Question 6. Square C
- Question 7. an arrow → moves one square · a program → is read in order · a bug → is a mistake — Here are the right matches: an arrow, one square; a program, in order; a bug, a mistake.
Questions from parents
How do I explain coding and decoding a path to a 1st grader?
An arrow moves the robot just one square: up, down, left or right. A program is a list of arrows. I read it in order, one square for each arrow, to find where the robot ends up.
What should my child be able to do with coding and decoding a path?
The questions check these points: understand that an arrow moves the robot one square in its direction; read a program of arrows in order to find where the robot ends up; build a program of arrows that leads the robot to the gift without touching the rocks; put arrows back in the right order: the order changes the robot’s path; read, build and fix a program of arrows on your own.
What if my child gets stuck on a question?
Each question has a hint before the answer is shown. For example: “Move one square for each arrow, from the first to the last.” After checking, the page explains the right answer.
Do we need an account to do the questions?
The first 4 questions work on this page with no account. The other 3 open with a Nina & Milo account, created by a parent. The account is free, with no credit card; the full program of the app is a subscription. The full worksheet and its answer key can always be printed for free.
Is the printable worksheet free?
Yes. The “Print the worksheet” button prints the questions on this page, followed by the answer key. You may copy it for use at home or in your classroom.