Think Python Chapter 14 ex 2