Dictionaries · 14 / 15 Exercise Medium

Student records

Objective

Create a Python program that stores students as dictionaries inside a list and analyzes them.

Instructions

  • Read the data of 3 students. For each one read three lines: name, age (integer) and grade (integer).
  • Store each student as a dictionary {"name": ..., "age": ..., "grade": ...} and add it to a list.
  • On the first line show Oldest: name (age) with the oldest student. If there is a tie, the first one that was read.
  • On the second line show Average grade: M, with the average of the grades to two decimals.
Input
ana
20
8
luis
23
6
eva
21
7
Output
Oldest: luis (23)
Average grade: 7.00

Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.

Start exercise