Commit 0ca811f5 authored by SINGH SOURABH BHAGWAN's avatar SINGH SOURABH BHAGWAN

also prints the transpose

parent 0f54af9d
3 4
1 2 3 4
5 6 7 8
2 5 6 8
5 5
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20
21 22 23 24 25
\ No newline at end of file
......@@ -24,10 +24,12 @@ t = open('transpose.txt','w')
dim = [c,r]
k = ''.join(str(x)+' ' for x in dim)
t.write(k+'\n')
print (k)
mat_tr = []
for j in range(0,c):
row = function2(mat,j)
mat_tr.append(row)
s = ''.join(str(y)+' ' for y in row)
t.write(s+'\n')
\ No newline at end of file
t.write(s+'\n')
print (s)
\ No newline at end of file
4 3
1 5 2
2 6 5
3 7 6
4 8 8
5 5
1 6 11 16 21
2 7 12 17 22
3 8 13 18 23
4 9 14 19 24
5 10 15 20 25
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment