Home›Lesson Plans›Computer Science›Programming · Grade 10

Dictionaries

Tenth graders store data as key-value pairs with a dictionary. Instead of a numbered position, each value has a meaningful key — like capitals[‘France’] gives ‘Paris’. They match keys to values, then build and look up data in a dictionary.

Grade 10Dictionaries (Key-Value Data)55 minutes1 class periodCSTA / ISTEExplicit teaching4 StandardsCSTA
Start the Lesson
Assign or share this lesson

Copy link works with Canvas, Schoology, Moodle and any other LMS — paste it in as a resource or assignment.

Lesson at a Glance

Everything you need before the bell rings

Learning Objectives

Students will be able to…

  • ✓Explain a key-value pair.
  • ✓Look up a value by its key.
  • ✓Add and update entries.
  • ✓Build a dictionary.
Essential Question

How do you store and look up data by a meaningful key?

0
Lesson Phases
0
Vocabulary Terms
0
Standards Aligned
0
Interactive Task
Match It · Interactive

Match Each Key to Its Value

Project this and match each key (country) to its value (capital) — tap the key, then tap the value.

🗝️ Match each key to the value it looks upTry it
Key (country)
Value (capital)
Now tap the value!
The Lesson · Use → Modify → Create (a coding progression with Unplugged practice)

55 minutes, five moves

Tap any phase to open the teacher moves and student actions.

1

Hook — Look It Up by Name

6 min

How would you store each country’s capital for instant lookup?

👩‍🏫 Teacher Moves

  • Show a lookup by name.
  • Ask how to store it.
  • Set the goal.

🎒 Student Actions

  • Look.
  • Guess.
  • Get ready.
2

Use — Dictionaries

13 min

Students use the idea.

👩‍🏫 Teacher Moves

  • Send students to Match Key to Value.
  • Match each one.
  • Note key → value lookup.

🎒 Student Actions

  • Match.
  • Say.
  • Note it.
3

Modify — Change Entries

14 min

Students modify.

👩‍🏫 Teacher Moves

  • Look up a value by its key.
  • Add a new key-value pair.
  • Update an existing value.

🎒 Student Actions

  • Look up.
  • Add.
  • Update.
4

Create — Build a Dictionary

15 min

Students create.

👩‍🏫 Teacher Moves

  • Make a dictionary (name → score).
  • Add 4 entries.
  • Look up and print one.

🎒 Student Actions

  • Make.
  • Add.
  • Look up.
5

Reflect — Reflect

7 min

Students close.

👩‍🏫 Teacher Moves

  • Say what a key is.
  • Say how you look up a value.
  • Complete the exit ticket.

🎒 Student Actions

  • Say it.
  • Say.
  • Complete the exit ticket.
Standards Alignment

Built to the standards you report on

Aligned to the CSTA K-12 Computer Science Standards and the ISTE Standards for Students.

CSTA
3A-AP-13

Create prototypes that use data to solve problems.

CSTA
3A-AP-14

Use data structures to reduce complexity.

CSTA
3A-AP-16

Combine control structures with data.

ISTE
5 Computational Thinker

Organize data to build solutions.

Differentiation

One lesson, every learner

Multilingual Learners

ELL / EMERGING READERS
  • Use a phonebook analogy.
  • Frame: “key unlocks a value.”
  • Point key to value.

Support & Access

IEP / 504
  • Use 3 pairs.
  • Look up one value.
  • One key at a time.

Stretch & Extend

GIFTED / EARLY FINISHERS
  • Loop over all keys.
  • Use a value that is a list.
  • Count items with a dictionary.
Materials

What to gather

  • 📽️Screen / board
  • 🗝️Key/value cards
  • 💻Match Key to Value
  • 🐍Python / editor
  • 📓Notebooks
  • 🎫Exit-ticket slips
Vocabulary

Key terms — hover for a quick definition

dictionarydata stored as key-value pairskeythe label you look up byvaluethe data stored for a keypaira key and its value togetherlookupgetting a value from its keyentryone key-value pairupdatechange the value for a keyunique keyeach key appears once
Evaluate

Exit Ticket

Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students.

QUESTION 1
What is a key?
The label you use to look up a value.
QUESTION 2
How do you get a value from a dictionary?
By its key, e.g. capitals[‘France’].
QUESTION 3
How is a dictionary different from a list?
A list uses number positions; a dictionary uses meaningful keys.

Reflect: dictionaries.

Have students build a 4-entry dictionary and look up one value. A printable dictionaries worksheet is in the Computer Science library.

Study · Flashcards

Study the key terms

Tap a card to flip it, then rate whether you knew it. Built from this lesson’s vocabulary.

🃏 CS Dictionaries (Grade 10)Flip
Card 1
Term
Tap to flip →
Meaning
0

Nice work!

Practice · Quiz

Check your understanding

A quick self-check with instant feedback, drawn from this lesson’s key terms.

📝 CS Dictionaries (Grade 10)Quiz
Score: 0
1 / 6
Question 1
0%

Nice work!

Practice · Worksheet

Printable worksheet

A print-and-go review sheet with a built-in answer key. Tap “Show answer key” to reveal answers, or print the clean version for students.

🖨️ CS Dictionaries (Grade 10)Print
Name: ________________________
Date: ____________

Part A · Write the word that matches each meaning

Word bank: dictionary, entry, key, lookup, pair, unique key, update, value
  1. each key appears once
  2. data stored as key-value pairs
  3. a key and its value together
  4. change the value for a key
  5. getting a value from its key
  6. one key-value pair
  7. the label you look up by
  8. the data stored for a key

Part B · Show what you learned

  1. What is a key?
  2. How do you get a value from a dictionary?
  3. How is a dictionary different from a list?
Answer key — Part A: 1) unique key · 2) dictionary · 3) pair · 4) update · 5) lookup · 6) entry · 7) key · 8) value
Part B: 1) The label you use to look up a value. 2) By its key, e.g. capitals[‘France’]. 3) A list uses number positions; a dictionary uses meaningful keys.