Skip to content

Conversation

DavidVFiumano
Copy link

@DavidVFiumano DavidVFiumano commented Jul 14, 2023

Added an is_prime() function to simplefunctions.py.
is_prime() takes a naive approach to assessing primality. It works by dividing every number from 2 to the number. It throws a ValueError if is_prime() is passed a number less than 2.

The unit test tests for the value error, then tests for every number from 2 to 100 against the list of all primes between 0 and 100.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant