Tutorpip← About this lessonAHide the answer keyDownload PDF
Coding · Ages 8+ · Set A
Ms. Okoro's treasure boxes
Scan to mark
on screen
A
Name
Date
Start Finish
Goal: 15 min
Score/ 11
Remember: A list is a row of numbered boxes, and the first is number zero. Five boxes run from zero up to four.

Read and answer

Read the story, then answer.

Counting from zeroMs. Okoro has a surprise for the Tinker Club: five treasure boxes in a row. The treasures are a star, a moon, a sun, a cloud and a bolt, and things kept in a row like that, in order, make a list. Bo sticks a number on every box, but Bo is a robot, and robots count from zero. "Bo, please open box number three," says Mina. Click! Out pops a cloud, but Mina wanted the sun. Ms. Okoro smiles. In a list, the places are counted from zero, so the first box is number zero and the sun, the third box, is number two. Mina asks for index two, and out pops the sun. Then Tavi asks to add a new treasure on the end, so a new box joins the row at index five.
1
Look at Bo's list. Which treasure is in box number 2?
the moonthe sunthe cloud
2
In a list, the first box is number .
zerotwoone
3
Mina asks Bo for box number three. Which treasure pops out?
the cloudthe sunthe bolt
4
The third treasure is in box number three.
TrueFalse
5
A list has five boxes, so the last index is .
fivefoursix
6
Each box in a list has a place number, which programmers call an index.
TrueFalse

Open the boxes

7
Join each treasure to its index.
  1. 1the first treasure
  2. 2the sun
  3. 3the fourth box
  4. 4the last of five boxes
  • Aindex 0
  • Bindex 4
  • Cindex 2
  • Dindex 3
8
Put the story of the growing list in order.
  • The old boxes keep their numbers
  • Tavi asks to add a treasure on the end
  • Five boxes sit in a row, numbered 0 to 4
  • A new box joins the row at index five
9
Mina swaps the moon for a heart. Which box holds the heart?
box 0box 1box 2
10
Mix-up to fix: Tavi says, "Five boxes, so the last index is five." What is the mix-up?
Five boxes run from zero to four, so the last index is fourThe last index is sixA list has no last index
11
Stretch: the new treasure joins at index five. Now the list has six boxes, so the last index is .
12
Line up five small things in a row, like a coin, a button and a spoon. Write their names and put a number on each, starting at zero.
13
Draw a row of five boxes and write the numbers 0 to 4 on them.
Scan the code at the top to mark this sheet on screenTake a photo of your answers or type them. It is marked for you automatically, and your score is kept.
Answer key · Set A
Ms. Okoro's treasure boxes
1the sun Counting from zero: star is box 0, moon is box 1 and sun is box 2.
20 Programmers count from zero, so the first box is number zero.
3the cloud Box 3 is the fourth box. It holds the cloud, but Mina wanted the sun.
4False Counting from zero, the third box is number two.
54 Five boxes go zero, one, two, three, four.
6True The index says which box to open.
71-A, 2-C, 3-D, 4-B Counting from zero: the first box is 0, the sun is 2, the fourth box is 3, and the last of five is 4.
84, 2, 1, 3 The list grows at the end, and the old boxes keep their numbers.
9box 1 The moon was in box 1. The box keeps its number, and only what is inside it changes.
10Five boxes run from zero to four, so the last index is four We count from zero, so five boxes run from zero up to four.
115 Six boxes run from zero up to five.
12Your own words: a grown-up reads it.
Mark each answer, count the right ones and write the score on the sheet.