1
Could you help with Matrix in python?!
The exercise is as follows, a function matriz_mult(n1, n2)
takes two matrices as parameter and returns True
if the matrices are multiplied in the given order and False
otherwise.
The way out must be something like :
n1 = [[1, 2, 3], [4, 5, 6]]
n2 = [[2, 3, 4], [5, 6, 7]]
matriz_mult(n1, n2) => False
n1 = [[1], [2], [3]]
n2 = [[1, 2, 3]]
matriz_mult(n1, n2) => True
This question already has an answer. Do a search. I’m on my cell phone and I have no way to find it now.
– Wilker
The memory may be failing me, but what you mean is, "...multiply in the order given"?
– Miguel
The problem begins by understanding the mathematical principle. What says that two matrix are multipliable?
– Giuliana Bezerra
If you already know the mathematical principle, read about the function
len
python.– Woss
@Wiker, sorry but I couldn’t locate, I had found something referring to the sum of matrices only. @A
– Mário Rodeghiero