A school exports its mark book as one long list. Student 0's marks come first, one for each of the num_tests tests, then student 1's marks, and so on. The list always splits evenly into students.
A teacher wants a close look at one test. test says which: 0 is the first test, 1 the second, and so on. A mark of pass_mark or more is a pass.
Task: write test_review(marks, num_tests, test, pass_mark) and return a dict about that one test:
| Key | Value |
|---|---|
"passed" | how many students passed it |
"share" | the fraction of students who passed it, rounded to 2 decimal places |
"best" | the highest mark anyone got in it |
"spread" | the spread of its marks, using NumPy's .std(), rounded to 2 decimal places |
"pass_average" | the average of the passing marks only, rounded to 2 decimal places, or None if nobody passed |
There is always at least one student.