Anyway...

It was just a self inflicted exercise. After I posted the first one I read a couple pages over and found a way that is faster and less code. To do the user input will require finishing the chapter I'm on in the book.