Question: Write a function, product(a), that takes an array, a, of numbers and returns their product: a[0] * a[1] * * a[len(a)-1]. b)Write a function, average(a),
- Write a function, product(a), that takes an array, a, of numbers and returns their product:
a[0] * a[1] * * a[len(a)-1].
-
b)Write a function, average(a), that takes an array, a, of numbers and returns their average: (a[0] + a[1] + + a[len(a)-1]) / len(a).
Using Python
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
