Select students
Created on Jan. 16, 2017 by Antoine Mazières
Write a function telling apart accepted and refused students according to a threshold.
The function should be called select_student
and takes as arguments:
- A list where each element is a list of a student name, and his grade.
- A grade. The student grade must be superior or equal to the given grade to be accepted.
Your function must return a dictionary with two entries:
Accepted
which list the accepted students sorted by grades in the descending order.Refused
which list the refused students sorted by grades in ascending order.
Example
1 2 3 4 5 6 7 8 9 10 11 |
|