Question: Perform the following tasks: 1 . Write a function called mylncArray that takes a number N as input and returns an array containing N elements:

Perform the following tasks:1. Write a function called mylncArray that takes a number N as input and returns an array containing N elements: 1,2,3,..., N. Use this function and N to construct a new array A.2. Write a function called myDecArray that takes a number N as input and returns an array containing N elements: N, N-1, N-2,...,1. Usetnis tunction ana N to construct a new array D.3. Write a function called mySumArray that takes two arrays as input and returns their sum. Use this function and arrays A and B to construct a new array C.4. Write a function called myMultArray that takes an array as input and constructs a new array whose n-th entry is given by n plus n times the n-th element the input array. Use this function and the array C to constructa new array D5. Construct E to be one more that the sum of all elements in D, using the built-in function called 'sum'.

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 Programming Questions!