This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def liste_matris(m=matris, boyut=5): | |
| matris = {(0, 3): 1, (2, 1): 2, (4, 3): 3} | |
| matris2 = [] | |
| n = 0 | |
| while n != boyut: | |
| matris2.append([0] * boyut) | |
| n += 1 | |
| for tup in matris: | |
| matris2[tup[0]][tup[1]] = matris[tup] | |
| return matris2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def row_times_column(m1, row, m2, column): | |
| """ | |
| >>> row_times_column([[1, 2], [3, 4]], 0, [[5, 6], [7, 8]], 0) | |
| 19 | |
| >>> row_times_column([[1, 2], [3, 4]], 0, [[5, 6], [7, 8]], 1) | |
| 22 | |
| >>> row_times_column([[1, 2], [3, 4]], 1, [[5, 6], [7, 8]], 0) | |
| 43 | |
| >>> row_times_column([[1, 2], [3, 4]], 1, [[5, 6], [7, 8]], 1) | |
| 50 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Nokta: | |
| def __init__(self, x=0, y=0): | |
| self.x = x | |
| self.y = y | |
| class Dikdortgen: | |
| pass | |
| def noktayi_yaz(p): | |
| print '(%s, %s)' % (str(p.x), str(p.y)) |
NewerOlder