Rate this product
1.Write a function that will take in three inputs: base, exponent, and divisor. The output would be the product of the values of the modulus operations, such that when taking that as the modulus of the divisor, you will get the problems remainder.
Function name should be modulus_product. Do not print anything out. Comment out or delete your test cases.
Example:
modulus_product(3,644,645) means 3644 mod 645. The functions output should be 3560436, because 81, 396, 111 are the remainders used in finding the overall problems remainder, and 81 x 396 x 111 = 3560436. See the screenshot below for further details.
Instructor: Ali Sharifian
CECS 229 Fall 2019
2.Write a function, isPrime(L). input:
L list of numbers greater than 1. output: numbers from that list that are prime
example: isPrime([2, 5, 8, 10, 13]) will return [2, 5, 13]Do not print anything out. Comment out or delete your test cases.
Reviews
There are no reviews yet.