Question: PLEASE WRITE IN PYTHON USING JUPYTER NOTEBOOK. USE THESE LINES TO TEST PLEASE print( Testing primes(1, 10) Result:, primes(1, 10), Expected: {2, 3, 5,

PLEASE WRITE IN PYTHON USING JUPYTER NOTEBOOK.
USE THESE LINES TO TEST PLEASE
print(" Testing primes(1, 10) Result:", primes(1, 10), " Expected: {2, 3, 5, 7}") print(" Testing primes(2, 37) Result:", primes(2, 37), " Expected: {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37}") print(" Testing primes(2, 100) Result:", primes(2, 100), " Expected: {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97}")
Problem 1: Create a function primes (a,b) that uses the Sieve of Eratosthenes to find all the primes p satisfying apb. You may not use any built-in functions that perform entire or part of this algorithm. 1. INPUT: - a - a positive integer greater than or equal to 1 (raise a ValueError if an integer less than 1 is given), that is the lower bound - b - a positive integer greater than or equal to a (raise a ValueError if b
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
