Remember: A dictionary holds pairs, and you look up a key to get its value. Each key is used once, and a table adds more columns.
Read and answer
Read the story, then answer.
Prices at the cafeRavi and Zoe run the Tinker Club cafe. Zoe kept the prices in a list with no order, so she had to open box after box to find the cookie, and the line groaned. Ravi writes each snack beside its price: apple one coin, cookie two, juice three and soup four. Each snack is a key, and its price is the value in its pair. A collection of key and value pairs is called a dictionary. Give it the key cookie and it hands back the value two. Each key may appear only once. When Ravi adds a giant cookie, he names it giant cookie, and it costs five coins.
1
Look up the key giant cookie. Which value comes back?
2 coins5 coins4 coins
2
In a pair, the snack is the key and the price is the .
keylistvalue
3
Two keys in a dictionary may have the same name.
TrueFalse
4
Ravi names the giant cookie cookie too. Why is that a mix-up to fix?
Two rows would have the key cookie, so the price is unclearA giant cookie costs too muchA dictionary holds only four pairs
5
Which one is a value, not a key?
soup4 coinsjuice
6
To find a price in a dictionary, you count the boxes until you reach it.
TrueFalse
Sort, order and fix
7
Circle every one that fits a dictionary best.
Steps to wash your handsPets and their agesSongs played in orderNames and favorite colors
8
A customer asks for the price of juice. Put what Zoe does in order.
She reads the value beside it
The customer asks for juice
She says 3 coins
Zoe finds the key juice in the table
9
Snack, price and how many are left make a table with three columns.
TrueFalse
10
In a table, each row is one .
recordkeycolumn
11
Cookie costs 2 coins and giant cookie costs 5. The giant cookie costs coins more.
12
A word book works like a dictionary. In it, which is the key?
the meaningthe page colorthe word
13
Make a lookup table: write three animals and a favorite food for each.
14
Draw a menu board with three snacks and their prices in coins.
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
The Tinker Club cafe
15 coins The key giant cookie leads straight to its value of 5 coins.
2value Each snack is a key, and its price is the value in its pair.
3False Each key may appear only once, or the lookup is unclear.
4Two rows would have the key cookie, so the price is unclear Each key may be used only once. Naming it giant cookie fixes it.
54 coins The price you get back is the value. The snack you look up is the key.
6False No counting and no searching, because the key leads straight to its value.
7Pets and their ages, Names and favorite colors A name or a pet leads to its answer, so a dictionary fits. Steps and songs must stay in order, so a list fits.
83, 1, 4, 2 Zoe finds the key, reads its value and answers, with no counting of boxes.
9True Add more columns and a dictionary becomes a table.
10record Each row is one record, with one row for each key.
113 5 - 2 = 3.
12the word The word is what you look up, and it leads to its meaning.
13Your own words: a grown-up reads it.
Mark each answer, count the right ones and write the score on the sheet.