Using Python Write a function avg(matrix), which takes a two-dimensional matrix as an argument, and returns the average
Posted: Fri Jul 08, 2022 6:38 am
Using Python
Write a function avg(matrix), which takes a two-dimensionalmatrix as an argument, and returns the average of all elements. Forexample, the function should return 5.0 for a matrix of [[1, 2, 3],[4, 5, 6], [7, 8, 9]] (no additional library/package)
Write a function avg(matrix), which takes a two-dimensionalmatrix as an argument, and returns the average of all elements. Forexample, the function should return 5.0 for a matrix of [[1, 2, 3],[4, 5, 6], [7, 8, 9]] (no additional library/package)