Loading...
Find all prime numbers up to a given limit.
A prime number is only divisible by 1 and itself. The Sieve of Eratosthenes is an efficient algorithm:
Write a function find_primes(n) that returns all prime numbers up to n.
Return a list of prime numbers in ascending order.
n = 20
[2, 3, 5, 7, 11, 13, 17, 19]
Filter out composites: 4,6,8,9,10,12,14,15,16,18,20 leaving primes