Questions & AnswersPython Programming

 grades = [    # First line is descriptive header. Subsequent...

Question
Answered step-by-step
Asked by wakinbami on coursehero.com

 grades = [    # First line is descriptive header. Subsequent...

 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
   ###

Answer & Explanation

Solved by verified expert
Answered by Arjun1294 on coursehero.com
<pre><code class="language-python">sectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem i</code></pre>sectetur adipiscing elit.
CliffsNotes Logo

Unlock access to this and over
10,000 step-by-step explanations

Unlock Explanation

Have an account? Log In

Step-by-step explanation

<figure class="image"><img src="/qa/attachment/26439106/" alt="26439106"/></figure>sectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec alique
1 attachment
Subscribe to unlock attachment
PNG

Get unstuck with a CliffsNotes subscription

Example CliffsNotes Question and Answer
Unlock every step-by-step explanation, download literature note PDFs, plus more.Get Access

Related Q&A