From fcf3f9b3cdc637cc47fec5a3a9965cfa89935123 Mon Sep 17 00:00:00 2001 From: frankmor3no <43287969+frankmor3no@users.noreply.github.com> Date: Thu, 4 Jul 2019 01:12:49 -0500 Subject: [PATCH] Python1 Technical Test --- primes.py | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/primes.py b/primes.py index 1f4596d..c324213 100644 --- a/primes.py +++ b/primes.py @@ -1,16 +1,14 @@ -""" -Your module documentation here -""" - - class PrimeClass(object): - """ - Your class documentation here - """ + def is_prime(self, num_int): - """ - Your method documentation here - """ - # your primes code here - return "not implement yet" # Remove this dummy line + if num_int < 1: + return False + elif num_int == 2: + return True + else: + for i in range(2, num_int): + if num_int % i == 0: + return False + return True + \ No newline at end of file