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
Answer and explanation
Concise answer
A collection of key-value pairs in which a value is accessed using its associated key
Why this is correct
A dictionary stores pairs consisting of a key and its associated value. The key is used to access the value.
Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.
Common mistake
No common mistake is linked to this question yet.
