6. is_prime


I am having the same problem. Can someone help me figure out the problem.

def is_prime(x):
    if x == 0 or x == 1:
        return False
    for n in range(2, x-1):
        if x % n == 0:
            return False
            return True


my answer covers your question as well? Your loop also ends in the first run. While it should run all values, and then return True if the number is a prime. (hint: indention)