.6 Prime numbers


the problerm

it return true when x = 9

why when x=9 return true?
What is wrong with this code

if x < 2:
        return False
    elif x == 2:
        return True
        for n in range(2,x):
#            print x%n
            if x%n == 0:
                return False
            return True  ```'s!


The last line needs to line up with the FOR, not the IF. It is returning True inside the loop. We need it to return True only if the loop completes iterating without returning False.