[Solved] CECS229 Assignment 2

$25

File Name: CECS229_Assignment_2.zip
File Size: 188.4 KB

SKU: [Solved] CECS229 Assignment 2 Category: Tag:
5/5 - (1 vote)

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.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CECS229 Assignment 2
$25