Consider the following partial solution to this problem:
class HighScores(object):
def __init__(self, scores):
self.scores = scores
def latest(self):
return self.scores[-1]
def personal_best(self):
self.scores.sort()
return self.scores[-1]
This will pass the tests for the functions it implements. However, if latest is called after calling personal_best, it can give the wrong answer. The current tests do not check for this situation.