There are far fewer tests in the exercise than are described in the problem specification, and an important one has been omitted. I ran into two problems, but there are probably more:
-
The problem specification for the grade-school test says, “If a test attempts to add the same student more than once, your implementation should indicate that this is incorrect.” There’s no test to validate this and the solutions I checked do not meet this specification.
-
The problem specification also says, “Grades should be sorted as 1, 2, 3, etc.” but the data structure used to store the grades is a dictionary, which is unordered, and the test does not and cannot check for the ordering of the grades.
Is the test program due for an upgrade? Also, it is unclear to me how the exercise should deal with multiple adds of the same student; the canonical data in the specification doesn’t seem to allow for raising an error condition, but any practical implementation would probably do so.