Highest Grade
Given a dictionary of
grades
with subjects (as keys) and grades (as values), you are asked to find the subject with the highest grade.The program should print the name of the subject that has the highest grade. It’s guaranteed that there is only one such subject.
Input | Output |
{'Physics': 8, 'Math': 9, 'History': 6.5} | Math |
{'Biology': 7, 'Chemistry': 8.5, 'English': 7.5} | Chemistry |
Constraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB