Answer:
Step-by-step explanation:
The following code is written in Python. The function, as asked, takes in three parameters and creates a 2D array with the dimensions specified in the inputs and fills it with the element passed for the third parameter.
def createArray(rows, columns, element):
my_array = []
for x in range(rows):
sub_arr = []
for y in range(columns):
sub_arr.append(element)
my_array.append(sub_arr)
return my_array