Exercise 2 of Learn Python The Hard Way