Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taskB_inlab
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
group18
taskB_inlab
Commits
480ddd5c
Commit
480ddd5c
authored
Aug 24, 2016
by
SHRADDHEYA SHENDRE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding task3.py (B3)
parent
2f8c3463
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
task3.py
task3.py
+37
-0
No files found.
task3.py
0 → 100644
View file @
480ddd5c
f
=
open
(
'matrix.txt'
,
'r'
)
line1
=
f
.
readline
()
rowscols
=
line1
.
split
()
rows
=
int
(
rowscols
[
0
])
cols
=
int
(
rowscols
[
1
])
Mat
=
[[
None
for
j
in
range
(
cols
)]
for
i
in
range
(
rows
)]
for
i
in
range
(
rows
):
line
=
f
.
readline
()
colvec
=
line
.
split
()
for
j
in
range
(
cols
):
Mat
[
i
][
j
]
=
colvec
[
j
]
f
.
close
()
Trans
=
[[
None
for
j
in
range
(
rows
)]
for
i
in
range
(
cols
)]
for
i
in
range
(
cols
):
for
j
in
range
(
rows
):
Trans
[
i
][
j
]
=
Mat
[
j
][
i
]
f2
=
open
(
'transpose.txt'
,
'w'
)
f2
.
write
(
str
(
cols
))
f2
.
write
(
" "
)
f2
.
write
(
str
(
rows
))
f2
.
write
(
"
\n
"
)
for
i
in
range
(
cols
):
for
j
in
range
(
rows
):
f2
.
write
(
str
(
Trans
[
i
][
j
]))
f2
.
write
(
" "
)
f2
.
write
(
"
\n
"
)
f2
.
close
()
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment