Skip to content

Commit 0a207e5

Browse files
authored
Add files via upload
1 parent c62b3c9 commit 0a207e5

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Addition of two Matrices.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
X= [[1,2,3],
2+
[4,5,6],
3+
[7,8,9]]
4+
Y= [[1,2,3],
5+
[4,5,6],
6+
[7,8,9]]
7+
result= [[0,0,0],
8+
[0,0,0],
9+
[0,0,0]]
10+
for i in range(len(X)):
11+
for j in range(len(X[0])):
12+
result[i][j]= X[i][j]+Y[i][j]
13+
14+
for r in result:
15+
print(r)

0 commit comments

Comments
 (0)