What is wrong here?


#1


#2

could you post your code so i can run it? I see a few problems. One:
range is a build in python function, it is not a list. it should be range()
Your for loop only executes once. In the first run of your loop, either if is true and returns False, otherwise else will be executed, and return True. You want to return True when the loop is finished, so you might want to think about how you indent your else/where to put the return True statement


#3
def is_prime(x) :
    x = int(x)
    for n in range[2:x-1] :
        m = x%n
        if m == 0:
            return False
        else:
            return True

#4

Thank you, what of the points i mentioned in my first answer?


#5

I haven't corrected anything yet once I'll do ,. I will tell you about ...
thank you very much for your patience with me :blush: :blush: