grades = [
# First line is descriptive header. Subsequent lines hold data
['Student', 'Exam 1', 'Exam 2', 'Exam 3'],
['Ken', '100', '90', '80'],
['Pat', '88', '99', '111'],
['Sam', '45', '56', '67'],
['Jon', '59', '61', '67']
]
Question:
Complete the function get_ranked_students which takes grades as an argument and returns a new list, ranked_students, which contains the names of students in order by decreasing score. That is, ranked_students[0] should contain the name of the top student (highest average exam score), and ranked_students[-1] should have the name of the bottom student (lowest average exam score).
def get_students(grades):
###
### YOUR CODE HERE
###
Unlock access to this and over
10,000 step-by-step explanations
Have an account? Log In