[THIS HAS BEEN SOLVED - COULD NOT MARK THIS POST SOLVED OR DELETE IT (SORRY)]

Hi,

I was hoping to get some help with this function. I've written it out as:

def is_prime(x):

if x == 1 or x == 0:

return False

if x == 2 or x == 3:

return True

for n in range(3,x-1):

if x % n == 0:

return False

else:

return True

When I run this in python it runs and returns the right answer after looping, but not until the end. How can I go about fixing this?