Ex 10 from Learn Python the Hard Way