Created
May 24, 2011 14:52
-
-
Save gceylan/988854 to your computer and use it in GitHub Desktop.
class örnek
This file contains 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)) | |
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