Exam-style question
Try this first
A dictionary is used for information retrieval from the document "The green, green grass grows". Explain how the dictionary {"grass": 1, "green": 2, "grows": 1, "the": 1} represents the document, and explain how the key "green" can be used to retrieve information.
Answer and explanation
Concise answer
The dictionary contains one key for each distinct word in the document.
Why this is correct
This demonstrates both the key-value structure and a simple information retrieval application. A word is used as a key, and its associated count is retrieved as 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.
