You don't learn much by typing a problem solution from the textbook into your computer, so I'm putting downloadable copies of the code for all the "Worked Exercises" in the textbook here.