Chapter 4 exercises done.

Personally, I chose not to treat an invalid value as fatal, but fair enough!