7. Student Academy
Write a program, which keeps information about students and their grades.
You will receive n pair of rows. First you will receive the student's name, after that you will receive his grade. Check
if student already exists, and if not, add him. Keep track of all grades for each student.
When you finish reading data, keep students with average grade higher or equal to 4.50. Order filtered students by
average grade in descending.
Print the students and their average grade in format:
{name} –> {averageGrade}
Format the average grade to the 2 nd decimal place.
Examples
Input Output Input Output
5
John
5.5
John
4.5
Alice
6
John -> 5.00
George -> 5.00
Alice -> 4.50
5
Amanda
3.5
Amanda
4
Rob
5.5
Robert -> 6.00
Rob -> 5.50
Christian -> 5.00
Page 1 of 9 Follow us:
© Software University Foundation. This work is licensed under the CC-BY-NC-SA license.
Alice
3
George
5
Christian
5
Robert
6
https://pastebin.com/zZSsnwKk - джъджа ми дава само 12 точки: мисля, че е бавен алгоритъма. Ако може малко помощ.