Exercise Workout from Think Python by Allen Downey, published by O'Reilly Media.