Question: Q2: Primes from the interval Write a function, prime list_reversed, which takes in two positive integers, x and y and output a list containing all

 Q2: Primes from the interval Write a function, prime list_reversed, which

Q2: Primes from the interval Write a function, prime list_reversed, which takes in two positive integers, x and y and output a list containing all prime numbers within the range of x and y (both inclusive) and returns this list in reverse order. After you are done with the code, insert a few assert statements that checks whether the input is correct (satisfies the problem conditions) def prine 1ist reversed (x, y) Input: the number x and y Output: all prime numbers within x, yl in reverse order >> prime 1ist reversed (3, 10) 7, 5, 3 >>> prime_list reversed (3, 3) # YOUR CODE IS HERE # assert # YOUR CODE IS HER "first argument must be an integer" assert # YOUR CODE IS HERE t "second argument must be an integer" assert # YOUR CODE IS HERE # "first argument must be positive" assert # YOUR CODE IS HERE # "second argument must be > than the first one

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!