Problem 4: Number of Nine (100pts)

Write a function that takes a positive integer \( n \) and returns the number of \( 9 \) in each digit of it. (Using floor division and modulo might be helpful here!)

def number_of_nine(n):
    """Return the number of 9 in each digit of a positive integer n.

    >>> number_of_nine(999)
    3
    >>> number_of_nine(9876543)
    1
    """
    "*** YOUR CODE HERE ***"

Test your implementation with python ok -q number_of_nine.