6 Antworten
+ 1
Thanks for your help
0
a=[[1,2,3],[4,5,6],[7,8,9]]
this is a 3×3 matrix
0
okk. can you tell me how to perform operations like addition, multiplications & inverse. I have tried a*b for two matrices but that did not work
0
I type this but I get an IndentationError why??
- 1
a is a matrix...
b is a matrix...
so u do....
first declare a c matrix loaded with 0
like c=[[0]*n for i in range(n)]
c is a n×n matrix...all 0 elements
now ..
for i in range(n) :
for j in range(n) :
c[i][j]=a[i][j]+b[i][j]
now your task is to implement the multiplication.....
u know the mathematics
just convert it to code
- 1
typed what Nathalia@ ??