def MatrixProduct(a, b):
d=[]
i=0
while i<len(a):
j=0
e=[]
while j<len(b[0]):
k=0
r=0
while k<len(a[0]):
r+=a[i][k]*b[k][j]
k+=1
j+=1
e.append(r)
d.append(e)
i+=1
return d
d=[]
i=0
while i<len(a):
j=0
e=[]
while j<len(b[0]):
k=0
r=0
while k<len(a[0]):
r+=a[i][k]*b[k][j]
k+=1
j+=1
e.append(r)
d.append(e)
i+=1
return d
No comments:
Post a Comment