Implement the python function: def createTwoDimensionalArray (row, column, initialValue): This function gets 3 integers as input row,
Fantastic news! We've Found the answer you've been seeking!
Question:
Implement the python function: def createTwoDimensionalArray (row, column, initialValue): This function gets 3 integers as input row, column, initialValue. When called, it should return a list of lists equivalent to a two-dimensional array of having row number of rows, column number of columns, and each of the cell will have initial value of initialvalue. row and column will be positive integers. As for example, createTwoDimensionalArray (3, 4, -1) will return a list of lists
[[-1, -1, -1, -1], [-1, -1, -1, -1], [-1, -1, -1, -1]].
This is equivalent to following the two-dimensional array of having 3 rows, 4 columns, and each cell is initialized with
-1: -1 -1 -1
-1 -1 -1 -1
1 -1 -1 -1
Posted Date: