My work towards learning python through exercise 36 on http://learnpythonthehardway.org/book/