Think Python Chapter 14 ex 3