Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

İki Boyutlu Bir Matrisin Transpozunu Alan Kod #829

Open
wants to merge 1 commit into
base: 47.Bir-matrisin-transpozunu-alma
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions MatrisinTranspozu.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
matris = [[1, 2, 3],
[4, 5, 6],
[7, 8, 9],
[10, 11, 12]]

print("Matris:")
for i in range(len(matris)):
for j in range(len(matris[i])):
print(matris[i][j], end="\t")
print()

matris_T = [[0 for x in range(len(matris))] for y in range(len(matris[0]))]

for i in range(len(matris)):
for j in range(len(matris[i])):
matris_T[j][i] = matris[i][j]

print("\nTranspozu:")
for i in range(len(matris_T)):
for j in range(len(matris_T[i])):
print(matris_T[i][j], end="\t")
print()

# OUTPUT:

# Matris:
# 1 2 3
# 4 5 6
# 7 8 9
# 10 11 12

# Transpozu:
# 1 4 7 10
# 2 5 8 11
# 3 6 9 12