Happy Number Identifier

A Python function to verify if a given positive integer is a 'happy number' or not.

Write a Python function `is_happy(n)` that takes a positive integer `n` and returns `True` if it is a 'happy number', and `False` if it is not. A 'happy number' is defined as an integer that, when the process that squares each of its digits and sums the results is repeatedly applied, eventually reaches to 1. If the process enters a loop not reaching 1, the number is considered to be 'unhappy'. ### Parameters - `n` (int): A positive integer to be checked. ### Returns - (bool): Returns `True` if `n` is a happy number, otherwise returns `False`. ### Examples ```python # For 19, the process leads to 1 indicating it's a happy number is_happy(19) # returns: True # For 2, the process loops without reaching 1 indicating it's not a happy number. is_happy(2) # returns: False ```