From e9cf7af65df9662cae73f789379a640fc6392063 Mon Sep 17 00:00:00 2001 From: TiagoRG <35657250+TiagoRG@users.noreply.github.com> Date: Sat, 25 Feb 2023 11:41:27 +0000 Subject: [PATCH] FP: isPrime update --- 1ano/1semestre/fp/aula04/isprime.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/1ano/1semestre/fp/aula04/isprime.py b/1ano/1semestre/fp/aula04/isprime.py index 44b73e5..b3d0d0c 100755 --- a/1ano/1semestre/fp/aula04/isprime.py +++ b/1ano/1semestre/fp/aula04/isprime.py @@ -1,4 +1,6 @@ def isPrime(n): + if n == 1: + return False for x in range(2, n): if n % x == 0: return False