Add initial code and assertions to start exercise 1

The name_to_number() function has currently the original code
in the book. The goal of the exercise is to generalize the function.

I have added assertions to check that the values tested interactively
in the code samples in the book are actually found when calling
the functions.