Skip to content

Instantly share code, notes, and snippets.

@gceylan
Created May 24, 2011 14:52
Show Gist options
  • Save gceylan/988854 to your computer and use it in GitHub Desktop.
Save gceylan/988854 to your computer and use it in GitHub Desktop.
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))
box = Dikdortgen()
box.w = 100.0
box.h = 200.0
box.kose = Nokta()
box.kose.x = 0.0;
box.kose.y = 0.0;
def merkez_bul(box):
p = Nokta()
p.x = box.kose.x + box.w/2.0
p.y = box.kose.y - box.h/2.0
return p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment