def is_prime(number):
    """States if a number is prime.

    :param number: A number
    :type number: int

    :rtype: bool

    **Examples**

    >>> is_prime(31)
    True

    >>> is_prime(42)
    False
    """
    for factor in range(2, number):
        if not number % factor:
            return False
    return True
