Records: Edexcel International GCSE practice
Dictionaries and records. 6 questions in the style of the Edexcel International GCSE exam.
Sample questions
What is printed by this code?
student = {"name": "Ana", "age": 15}
print(student["age"])- name
- Ana
- 15
- age
Write a program that reads a whole number n, then n lines in the form `name,score`. Store each line as a record (a dictionary with keys "name" and "score") in a list. Then print `Top: X`, where X is the name of the highest scorer (the first one if there is a tie), and `Average: A`, where A is the mean score rounded to 1 decimal place.