What is wrong here?



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

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


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


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: