Skip to content

Instantly share code, notes, and snippets.

View gceylan's full-sized avatar
🏠
Working from home

Gökhan CEYLAN gceylan

🏠
Working from home
View GitHub Profile
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
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
@gceylan
gceylan / referans.py
Created May 24, 2011 14:52
class örnek
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))