We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0856d74 + e48a453 commit 7aa9361Copy full SHA for 7aa9361
1 file changed
Transpose_Matrix.py
@@ -0,0 +1,19 @@
1
+rows = int(input("Enter the Number of rows : " ))
2
+column = int(input("Enter the Number of Columns: "))
3
+
4
+print("Enter the elements of Matrix:")
5
+matrix= [[int(input()) for i in range(column)] for i in range(rows)]
6
+print("Matrix")
7
+for n in matrix:
8
+ print(n)
9
10
11
+result =[[0 for i in range(rows)] for j in range(column)]
12
13
+for r in range(rows):
14
+ for c in range(column):
15
+ result[c][r] = matrix[r][c]
16
17
+print("Transpose matrix is: ")
18
+for r in result:
19
+ print(r)
0 commit comments