Sieve of Eratosthenes
Write primes_up_to(limit) that returns a of all prime numbers ≤ limit, using the sieve: mark multiples of each prime as composite rather than testing each number individually.
Examples
primes_up_to(20) → [2, 3, 5, 7, 11, 13, 17, 19]
Exercise
3 checksSieve of Eratosthenes
def primes_up_to(limit):
...
print(primes_up_to(20))
Press Run to try your code, then Check answer to grade it.