Exam-style question
Try this first
What is a dictionary data structure?.
- A.A collection of values stored in a fixed order
- B.A collection of key-value pairs in which a value is accessed using its associated key
- C.A collection containing only numerical values
- D.A collection in which every item must have the same key
Model answer
What a good answer should say
- A collection of key-value pairs in which a value is accessed using its associated key
Explanation
Why this works
A dictionary stores pairs consisting of a key and its associated value. The key is used to access the value.
Common mistake
No common mistake is linked to this question yet.
