FP: isPrime update

This commit is contained in:
TiagoRG 2023-02-25 11:41:27 +00:00
parent bd1271c3d3
commit e9cf7af65d
Signed by untrusted user who does not match committer: TiagoRG
GPG Key ID: DFCD48E3F420DB42
1 changed files with 2 additions and 0 deletions

View File

@ -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