Posts Tagged ‘prime


Finding Primes: Part II – A Python Implementation

As it is easy to get started I first wrote a prime finding algorithm in Python. I used a very basic algorithm for this. I store a list of prime numbers, and I check the numbers less than the square root of the possible prime, if any are a factor of the number I’m checking then it’s a composite otherwise I append it to the list of prime numbers.

The code for this is on my Box account here. Continue reading ‘Finding Primes: Part II – A Python Implementation’