def gen_n_dict(n):
    """Creates a doctionary where the keys range from 0 to the number of
    digits in n. The definition for each key is 0.
    """
    n_dict = {} 
    for i in range(0, len(str(n))):
        n_dict[i] = 0
    return n_dict