Question: Problem Given two equal - sized one - dimensional arrays a and b , calculate the followings: multiply the two arrays element - wise add
Problem
Given two equalsized onedimensional arrays a and b calculate the followings:
multiply the two arrays elementwise
add the first element of a and the last element of b
divid evenindexed elements of a by evenindexed elements of b
Each of the above calculations should become an output value of your function.
Here are some concrete examples of what is expected:
given a and b the output of the function should be ; ;
given a and b the output of the function should be ; ;
Note that the grader generates random assessment cases and above example is not the only assessment cases. You should utilize 'Code to Call Your Function' script box and thoroughly test your function with more input arguments before making a submission.
Task
Write a function elementwisearithmetic that takes two inputs arguments and returns three output values. The input arrays will not be empty and always be equal in the number of elements, so you don't need to worry about that.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
