def factors(number):
    """Returns a mapping of factors for the given int"""
    if not isinstance(number, int):
        raise TypeError('number must be an int')
    factors = {}
    for num in range(1, number + 1):
        if number % num == 0: # if no remainder
            factors[num] = int(number / num)
    return factors