Appendix 1Possible Solutions

Since the first edition of this book, the single question I have been asked the most is “Where are the answers to the exercises?”

My reluctance centered around the first occurrence of the word the in that question.

The answers? There’s more than one right answer, of course. Many, many more. These aren’t math problems. Even the first exercises, which are sort of like math problems, have many possible solutions. If, instead of writing a program about orange trees or the minutes in a decade, you were asked to write a poem about them, it would be silly (if not downright harmful) to include “the answers.”

That was my reasoning, anyway. Kind of stupid, in retrospect—while these aren’t math problems, neither are ...

Get Learn to Program, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.