Question: (10%) a) Using a user-defined function, write a Python program that determines the index of the maximum entry of an array of arbitrary size and

(10%) a) Using a user-defined function, write a Python program that determines the index of the maximum entry of an array of arbitrary size and its corresponding value. Have your program print out the matrix, the index of the maximum value, and the value of the entry at that index. Test your code twice, using the two matrices given below. 0.5 6.6 0.7 1 3 4 1 12 13 10 1 12 A = 2 6 17 4 and B = 0 0.1 4 12 11 10 10 1 10.3 0.1 0 14 Your code should look exactly like the output shown below: Matrix: [[ 0.5 6.6 0.7 1. ] [ 2. 17. 4. ] [ 0.3 0.1 0. 14. ]] The max entry is located at index (1,2) A(1,2) is 17.0 6. Matrix: [[ 3. 4. 1. 12. 13. 10. 1. 12. ] [ 0. 0.1 4. 12. 11. 10. 10. 1. ]] The max entry is located at index (0,4) B(0,4) is 13.0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
