def get_factor(n, randomness):
    """
        returns a random factor for n and total number of factors
    """
    factors = list()
    for i in range(1, n):
        if n % i == 0:
            factors.append(i)
    return randomness.random_choice(factors), len(factors)