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

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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!