Python Functions · Week 5 — Working with Dictionaries (Practice)
30 questions on dict-handling functions; spiral review of Weeks 1-4; 5 challenge questions.
Python Coding Practice: Python Functions Week 5: Working With Dictionaries (Level 1)
This is a set of practice problems focusing on functions that work with Python dictionaries.
You will write functions to create, access, update, and loop through dictionary data.
Reminder
- Pass a dictionary to a function just like any other variable.
- Loop through keys, values, or both with
.keys(),.values(), and.items(). - Add or change a value:
my_dict[key] = value. - Check if a key exists:
if key in my_dict:.
Preview truncated — download the notebook to see the full lesson.