Question: 1. Generate a 2D list with random numbers between 1 and 9. Write a function named del Col that will take 2 parameters. The


1. Generate a 2D list with random numbers between 1 and 9. Write a function named del Col that will take 2 parameters. The first parameter is the 2D list and the 2nd parameter is the column number to be deleted. e.g. grid=[[5,8,3,6], [6,2,1,7], [3,7,9,4]] del Col(grid,0) will return the following 2d list [[8,3,6], [2,1,7], [7,9,4]] 19 [5 [/7 Sample output for Q1 Question 1: [2, 2, 8, 4, 1] 19505 2, 3, 3, 1] 2, 3, 9, 5] 8, 8, 1, 5] 7, 7, 2, 8] Sample output for question 1: [2, 8, 4, 1] (in this case 5x5 grid (the function should work for any mxn grid)) delCol(grid, e) removes the first column (index e) [2, 3, 3, 1] [2, 3, 9, 5] [8, 8, 1, 5] [7, 7, 2, 8]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
