Skip to content

Use Python to implement a Sieve of Eratosthenes for finding prime numbers.

Notifications You must be signed in to change notification settings

tim-foster/prime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Prime

Assigment was to find all prime numbers up to a given user input, using a Sieve of Eratosthenes. the restriction was that it had to be implemented using python.

The first implemention (prime.py) was completed in under 30 minutes. It uses a dictionary to cross out each found composite number. Then uses the keys left over to reveal the prime numbers.

The second implementation (primeoop.py) was my refactoring of the implementation to use OOP styles. I then added new methods to provide a more flexible implementation.

About

Use Python to implement a Sieve of Eratosthenes for finding prime numbers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages