Table of Contents:
- Find all factors of a number
n. - Factors must lie between
1andn.
Check Code Here: factors_of_n.py
- Prime number - only factors are 1 and the number itself.
eg:
factors(17) is [1, 17].
factors(18) is [1, 2, 3, 6, 9, 18].
Check Code Here: is_prime.py
- List all primes below a given number.
Check Code Here: primes_upto_n.py
- List the first n primes.
Check Code Here: first_n_primes.py