Home / Expert Answers / Computer Science / solve-in-python-please-from-a-2d-list-of-numbers-give-the-minimum-maximum-mean-and-median-valu-pa943

(Solved): Solve in python please From a 2D list of numbers, give the Minimum, Maximum, Mean, and Median valu ...



Solve in python please

From a 2D list of numbers, give the Minimum, Maximum, Mean, and Median values of each row.
The format of these lists is as fo

From a 2D list of numbers, give the Minimum, Maximum, Mean, and Median values of each row. The format of these lists is as follows \[ \begin{array}{l} {[1,2,3,4,5],} \\ {[3,4,5],} \\ {[45,83,65,52,47]} \end{array} \] The number of give lists is variable, and the length of each list is variable. Your code will not be tested for speed performance. Output your data as a string. Each list's stats are in ane row, which is separated by a newline character. Each number is separated by a comma, such as this: \[ \begin{array}{l} 1,2,3,4 \\ 6,7,8,9 \\ 1,2,3,4 \\ 3,6,8,9 \end{array} \] Example: input: \( [[1,3,5,7],[2,4,6,8],[3,5,7,9],[4,6,8,10]] \) return value: \[ \begin{array}{l} " 1,7,4,4.0 \\ 2,9,5,5.0 \\ 3,9,6,6.0 \\ 4,10,7,7.0^{n} \end{array} \] Note: Do not use print(). Creote and build the string in a variable, then return the string- Donot and extraspaces. You may end each row with a newline. (Your testing program will expect this).


We have an Answer from Expert

View Expert Answer

Expert Answer


CODE: def func(l): n=len(l) res='\"' # iterate through the 2d list of numbers for i in range(n): x=l[i] # find minimum a=min(x) # find maximum
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe