def average_of_factors(n):
    """
    n (int): number
    Returns the average of the positive divisors of n
    """
    # Initialize the sum
    total = 0
    # Initialize the number of factors
    count = 0
    for i in range(1, n+1):
        # Check if i is a divisor of n
        if n % i == 0:
            total += i
            count += 1
    average = total/count
    return average