def isPrime(n):
    """
    Determines whether a number is prime

    Arguments:
        n {integer} -- term
    Returns:
        isPrime {boolean}
    """
    assert n > 0, "invalid number"
    if n == 1:
        return False
    for i in range(2, n):
        if (n % i) == 0:
            return False
    return True