The index im checking is outs[i,3]
this should get the name of the second input in the corresponding loop.
I tried replacing it with outs[0,3]
to force a valid response but, i still get the IndexOutOfRange error
You talked about what index youāre checking, thatās part (b) in my comment. How about part (a)? Are you sure [0,3] is a valid index?
Yesā¦ since I created the array with the size [m,4].
So the index should read [0,3] even if empty
It is valid for an numpy array
, not for a list
.
https://numpy.org/doc/1.21/reference/arrays.indexing.html
Okay, found the problemā¦ my code always asks for 2 inputsā¦ the second testcase only have 1 input, so it causes the error
After finding the issue, I fixed and I even optimized the code a bitā¦ and now I got my 100%
Cool puzzle!