Update code sample for chapter 11.

I cleaned up whitespace, added a type annotation for the range, and fixed the string-to-number conversion for the guess input.