Write a function avg(matrix), which takes a two-dimensional matrix as an argument, and returns the average of all elemen

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write a function avg(matrix), which takes a two-dimensional matrix as an argument, and returns the average of all elemen

Post by answerhappygod »

Write a function avg(matrix), whichtakes a two-dimensional matrix as an argument, and returns theaverage of all elements. For example, the function should return5.0 for a matrix of [[1, 2, 3], [4, 5, 6], [7, 8,9]] (no additional library/package)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply