Skip to content

Latest commit

 

History

History
 
 

15.1-Matrix_Builder

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

15.1 Matrix Builder

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.

📝Instructions:

  1. 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.

  1. This function should return a list of lists that represents the matrix.

Expected result:

3 should return:

[
  [1, 1, 1],
  [1, 1, 1],
  [1, 1, 1]
]

💡 Hint:

  • Remember to append only the number 1.