Python Builder Lab · Lesson 6 of 10

Python Dictionaries for Labeled Data

Use key-value pairs so programs can describe named pieces of information more clearly.

Academy Plus 4 practice exercises 1 homework item

What you will learn

  • Explain what a Python dictionary is and why it helps with labeled data.
  • Identify keys and values in a small dictionary.
  • Read a value by using its key.
  • Update an existing value by key.
  • Add a new key and value to a dictionary.
  • Choose when a dictionary is clearer than a list for beginner records.

Lesson shape

20 minute lesson with 8 sections, 4 exercises, 4 checkpoint questions, and 1 homework submission.

This track requires the Academy Plus plan.

Lesson outline

What this lesson includes

This lesson is available with the Academy Plus membership. Create an account to open the full student player, exercises, quiz, and completion tracking.

Overview

From list items to labeled fields

Full lesson content unlocks in the student player.

Explain

What a dictionary is

Full lesson content unlocks in the student player.

Explain

Reading a value by key

Full lesson content unlocks in the student player.

example

Updating and adding by key

Full lesson content unlocks in the student player.

example

Worked example: client intake record

Full lesson content unlocks in the student player.

Practice

Small dictionary patterns to practice

Full lesson content unlocks in the student player.

Practice

Common first dictionary mistakes

Full lesson content unlocks in the student player.

Wrap up

Labeled data makes scripts clearer

Full lesson content unlocks in the student player.

Homework

Assignments attached to this lesson

Text response

Python Dictionaries for Labeled Data: quick check

Write a short beginner explanation of the main idea from Python Dictionaries for Labeled Data.

Not started

Open homework