def is_prime(n):
    """Checks if the argument n is a prime number. Returns True if it is, False otherwise."""
    # 1 is not prime by definition
    if n <= 1:
        return False

    # check up to sqrt(n) + 1 if there exists a number that divides n
    for divisor in range(2, int(n ** 0.5) + 1):
        if n % divisor == 0:
            # if divisor is found, n is not prime
            return False

    # if all checks up to here fail, n is prime
    return True