After some malicious code, mainly by Mr. Smith, the matrix has some gaping hole and it needs some help to rebuild. Create a matrix 1's based on a parameter.
- Create a function called matrixBuilder, which will expect 1 parameter (an integer):
-
This number represents the amount of rows and columns for the matrix.
-
Example: 5 means that the matrix should be 5x5.
- This function should return a list of lists that represents the matrix.
3 should return:
[
[1, 1, 1],
[1, 1, 1],
[1, 1, 1]
]
- Remember to append only the number
1
.