Question: In Python Copy/paste the code below into a python program. It creates a rectangular 2D list called random_numbers import random random.seed(112023) h= int (random.random ()15)
In Python
Copy/paste the code below into a python program. It creates a rectangular 2D list called random_numbers import random random.seed(112023) h= int (random.random ()15) w=int( random.random ()20) random_numbers =[[ int ( random.random ()1000) for col in range (w) ] for row in range (h)] Your job is to write code to traverse the 2D list to compute each of the following values. Output each of the requested computations and enter them. Notice that the questions might ask you to traverse the entire 2D list, or do a row-wise or column-wise computation. number of rows: number of columns: maximum value: average of all values in the entire 2D list, rounded to nearest integer: a list of the sums of each of the rows: a list of the sums of each of the columns
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
