Do problem 9 in Python, playing around with a class for kicks.