Practice - What is a Dictionary?
Practice Questions
Test your understanding with targeted questions
Define a dictionary for three fruits with their colors.
💡 Hint: Think of using fruit names as keys and their colors as values.
What type of data can be used as keys in a dictionary?
💡 Hint: Remember: NO lists as keys.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What would happen if you accessed a non-existent key in a dictionary?
💡 Hint: Think about how dictionaries manage their keys.
Can keys in a dictionary be other dictionaries?
💡 Hint: Remember the rule about keys!
1 more question available
Challenge Problems
Push your limits with advanced challenges
Create a function that accepts a dictionary and returns the sum of all its numerical values.
💡 Hint: Make sure to check that all values are numbers before summing.
Design a nested dictionary to track a class of students with their subjects and grades, then write a function to calculate their average grade.
💡 Hint: Consider how to extract each student's grades within the nested structure.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.