Use the prime_in(start,end)
function in the prime_generator.py file to generate prime numbers in python
start
-> starting value as integerend
-> ending value as integer
The function returns a list of prime numbers between start
and end
, where start
might itself be included if it is a prime number, but end
shall never be included
The sqrt and floor functions from the math module are required for the prime generator function, so import that one with the following code
from math import sqrt, floor
The above code is included in prime_generator.py