0

Can't find the bug!

https://code.sololearn.com/cwnuUQb8O8At https://code.sololearn.com/cNpsFeHLd9Hy The output should add the two matrices so the output is [[1,1,1,1],[1,0,0,0],[1,0,0,0]]. I can't use numpy, unfortunately. So I can't figure out why the second code works but the first does not. Any help please?? Thank you in advance. Also, the ultimate goal is to add the overall matrices. So I guess the output should eventually be [[1,1,1,1][1,4,4,4][1,2,4,4]], but I can't seem to get passed even adding the first matrix to the zero matrix.

16th Feb 2022, 7:24 PM
madeline
madeline - avatar
2 Antworten
0
Write the complete condition of your problem.
17th Feb 2022, 10:02 AM
Vladimir {Tomsk}
Vladimir  {Tomsk} - avatar
0
Input : [height of starting matrix, length of starting matrix, [pieces to fit inside matrix]] Output: [matrix filled with given pieces] Additional info: The matrix should have no zeros afterwards, completely full of the pieces. The pieces cannot be rotated, but may be given with less rows or columns than the starting matrix. Also, I didnt author this problem. It is from CodeWars..
17th Feb 2022, 10:40 AM
madeline
madeline - avatar