Quiz Night Podium

Data with PythonMedium+20 XP+20

Quiz Night Podium

Six players have just finished a quiz night. Their names and final scores are stored in two arrays, in the same order:

The host wants the podium: the names of the three highest scorers, best first.

Three tools you'll need, none of them in the chapter yet:

You writeYou get
np.sort(a)the values of a, smallest first
np.argsort(a)the positions that would put a in order, smallest first: the position of the smallest value, then the position of the next smallest, and so on
a[[2, 0]]the values at positions 2 and 0, in that order — an array of positions works the same way as a list of them

For example, with a = np.array([30, 10, 20]), np.sort(a) is [10 20 30] and np.argsort(a) is [1 2 0]. With letters = np.array(["x", "y", "z"]), letters[[2, 0]] is ['z' 'x'].

Which line prints the podium, best first?

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.

Select all that apply.