Question: Q 2 : Let arr be a 1 - dimensional NumPy array. Assuming that all the elements in arr are integers. Write a function that

Q2: Let arr be a 1-dimensional NumPy array. Assuming that all the elements in arr are integers. Write a function
that multiplies all the even integers by 3 and all the odd integers by 4.
For example, if arr is 1,2,3,4,5, you should return 4,6,12,12,20. Please write this code in python
 Q2: Let arr be a 1-dimensional NumPy array. Assuming that all

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!