Week 9 ยท 45-60 min

Dictionaries

Week Summary

A quick preview of the main ideas in this week before you begin the slides.

  • What Is a Dictionary?
  • Accessing Dictionary Values
  • Adding and Updating Entries
  • Removing Entries

Glossary

Review these key terms before starting this week. They are kept simple so students can learn the new vocabulary before moving into the slides.

What Is a Dictionary?
What Is a Dictionary?
Accessing Dictionary Values
Accessing Dictionary Values
Adding and Updating Entries
Adding and Updating Entries
Slide 1๐Ÿ’ก

What Is a Dictionary?

Learning goal

Store and access data using key-value pairs.

Read one card at a time. Focus on the main idea first, then look at the visual on the right to help it stick.

A dictionary stores data as key-value pairs.

It uses curly braces, like {"name": "Sam"}.

Keys are unique labels for values.

Dictionaries are useful for structured, labeled data.

They differ from lists, which use numeric indexes.

Remember

Dictionaries are useful when labels matter more than positions.

What Is a Dictionary?

What Is a Dictionary?

Slide 1 of 8

Use arrows or dots to move through the lesson

Practice

  1. Write 2-3 sentences about what you learned this week.

Coming Next Week: Next: File Input/Output Basics