def is_prime(n):
    """Returns if the given number is a prime number or not
    >>> is_prime(10)
    False
    >>> is_prime(7)
    True
    """
    """BEGIN PROBLEM 1.4"""
    if n in [2, 3]: # shortcut for if n equals 2 or 3
        return True

    if n % 2 == 0 or n < 2: # skip even numbers, since they are not prime anyways
        return False
    # only iterate the odd numbers from 3 to the nearest whole number of sqrt(n), skipping even numbers
    for i in range(3, round(n ** 0.5), 2):
        if n % i == 0: # if this conditional is true, n isn't prime
            return False
    return True
    """END PROBLEM 1.4"""