FP: isPrime update
This commit is contained in:
parent
b3d6069b27
commit
6d037d2397
|
@ -1,4 +1,6 @@
|
||||||
def isPrime(n):
|
def isPrime(n):
|
||||||
|
if n == 1:
|
||||||
|
return False
|
||||||
for x in range(2, n):
|
for x in range(2, n):
|
||||||
if n % x == 0:
|
if n % x == 0:
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in New Issue