Stuck on IS_PRIME!


#1

Help, It throws the error below, been stuck on this

.


#2

Hi @dontado,

Is your else block indented by one level too much? As is, it identifies x as prime the first time it finds a number that does not divide evenly into it. Instead, it should only execute if the loop has completed all its iterations without finding a divisor for x.


#3

That fixed it. Thanks


#4