We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
# Enter your code here. Read input from STDIN. Print output to STDOUTif__name__=="__main__":matrix1=[[1,2],[2,3]]matrix2=[[4,5],[7,8]]elem=0foriinrange(len(matrix1)):# row in 1st matrixforjinrange(len(matrix2[0])):# column in 2nd matrixforkinrange(len(matrix2)):# position indexelem+=matrix1[i][k]*matrix2[k][j]print(elem)elem=0
Linear Algebra Foundations #3- Matrix Multiplication
You are viewing a single comment's thread. Return to all comments →
Python3:
or