rewrite happy number test

This should work better. I didn't try to figure out what your code was doing wrong, I just wrote my own version.

Wow, Python is fun.