Exam-style question
Try this first
A program processes a list of names and counts how many times each name appears.
Description
Name Counting Program
The program should take a list of names and output how many times each name appears in the list.
- a[3]
Explain how counting is implemented in this program.
Aim for approximately 3 distinct marking points.
0 of 1 part answered
Answer every part before opening the mark scheme.
Concise answer preview
Concise answer
The program uses a loop to go through each name in the list, counts occurrences of each unique name, and then outputs the total counts for each name.
Why this is correct
Counting is done by iterating through the list and using a data structure to keep track of how many times each name appears.
Complete every part above to unlock the full mark scheme through the existing protected review flow.
Common mistake
No common mistake is linked to this question yet.
