diff --git a/prime/PrimeList.py b/prime/PrimeList.py new file mode 100644 index 00000000..a5dabec9 --- /dev/null +++ b/prime/PrimeList.py @@ -0,0 +1,19 @@ +class Prime: + def isPrime(self,num : int)->bool: + if num<=1: + return False + for i in range(2,num//2): + if num%i == 0: + return False + return True + + def genPrimeList(self,range:int)->list: + count = 0 + num=2 + List = [] + while(count