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

Dictionaries

Ninth graders learn dictionaries — collections that store data as key-value pairs, letting you look up a value by its key instead of a position. They’re ideal for things like names and scores. They explore the ideas, then build a dictionary.

Grade 9Dictionaries55 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…

  • ✓Define a dictionary.
  • ✓Use keys & values.
  • ✓Look up & update.
  • ✓Choose the right structure.
Essential Question

How do you store data you need to look up by name?

0
Lesson Phases
0
Vocabulary Terms
0
Standards Aligned
0
Interactive Task
Explore · Interactive

Dictionaries

Project this and tap each. Have students explore dictionaries.

📖 Explore dictionaries — tap eachTry it

The Lesson · Explicit teaching

55 minutes, five moves

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

1

Hook — Look It Up

6 min

How would you store each student’s score so you can find it by name?

👩‍🏫 Teacher Moves

  • Pose the question.
  • Share ideas.
  • Set the goal.

🎒 Student Actions

  • Think.
  • Share.
  • Get ready.
2

Use — Dictionaries

13 min

Students learn.

👩‍🏫 Teacher Moves

  • Send students to Dictionaries.
  • Tap each idea.
  • Note key-value pairs.

🎒 Student Actions

  • Tap each.
  • Say.
  • Note it.
3

Modify — Use It

14 min

Students practice.

👩‍🏫 Teacher Moves

  • Make a dictionary.
  • Look up a value by key.
  • Add a new pair.

🎒 Student Actions

  • Make.
  • Look up.
  • Add.
4

Create — Create

15 min

Students apply.

👩‍🏫 Teacher Moves

  • Build a dictionary for a task.
  • Update a value.
  • Explain your keys.

🎒 Student Actions

  • Build.
  • Update.
  • Explain.
5

Reflect — Reflect

7 min

Students close.

👩‍🏫 Teacher Moves

  • What is a dictionary?
  • How do you get a value?
  • Complete the exit ticket.

🎒 Student Actions

  • Say it.
  • Say it.
  • 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-14

Use dictionaries to store data.

CSTA
3A-DA-09

Choose appropriate data structures.

CSTA
3A-AP-17

Test code using dictionaries.

ISTE
5c

Organize data effectively.

Differentiation

One lesson, every learner

Multilingual Learners

ELL / EMERGING READERS
  • Key-value cards.
  • Frame: "the key ___ maps to ___."
  • Use a real example.

Support & Access

IEP / 504
  • Make one pair.
  • Use a template.
  • Look up one value.

Stretch & Extend

GIFTED / EARLY FINISHERS
  • Loop over a dictionary.
  • Nest a dictionary.
  • Count with a dictionary.
Materials

What to gather

  • 📽️Screen / board
  • 🔑Key-value cards
  • 💻Dictionaries
  • 💻Python
  • 📓Notebooks
  • 🎫Exit-ticket slips
Vocabulary

Key terms — hover for a quick definition

dictionarykey-value storagekeythe unique lookup namevaluethe data a key maps topaira key and its valuelookupgetting a value by keymapa key points to a valueuniqueno repeated keyscollectiona group of values
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 dictionary?
A collection that stores key-value pairs.
QUESTION 2
How do you get a value?
Look it up by its key, like scores[‘Ana’].
QUESTION 3
When are dictionaries best?
When you look things up by name, not position.

Reflect: dictionaries.

Have students build a dictionary for a real task. A printable dictionary sheet is in the CS 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.

🃏 DictionariesFlip
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.

📝 DictionariesQuiz
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.

🖨️ DictionariesPrint
Name: ________________________
Date: ____________

Part A · Write the word that matches each meaning

Word bank: collection, dictionary, key, lookup, map, pair, unique, value
  1. a key and its value
  2. the unique lookup name
  3. getting a value by key
  4. a key points to a value
  5. the data a key maps to
  6. no repeated keys
  7. key-value storage
  8. a group of values

Part B · Show what you learned

  1. What is a dictionary?
  2. How do you get a value?
  3. When are dictionaries best?
Answer key — Part A: 1) pair · 2) key · 3) lookup · 4) map · 5) value · 6) unique · 7) dictionary · 8) collection
Part B: 1) A collection that stores key-value pairs. 2) Look it up by its key, like scores[‘Ana’]. 3) When you look things up by name, not position.