Replace a number by the sum of the squares of its digits, repeatedly. If it reaches 1 it is happy; if it loops forever it isn't. Write is_happy(n).
is_happy(19) → True
is_happy(2) → False
Submit runs 5 tests, including hidden edge cases.
Run your code to see the output here.