Question: In python Write a function prod that has parameters of two lists arr1 and arr2 that are both the same size. This function should return

In python

Write a function prod that has parameters of two lists arr1 and arr2 that are both the same size. This function should return the product of all components of arr2 by 2 for which the corresponding components of arr1 are negative. For example,

if arr1 were [-1, 4, 9, -2, 7] if arr2 were [9, 5, 4, 2, 1]

The product returned would be 9 * 2 = 18.

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!