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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started