Created
July 17, 2012 17:49
-
-
Save anonymous/3130810 to your computer and use it in GitHub Desktop.
pypyppypypypy
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 Point: | |
''' Point class for representing and manipulating x,y coordinates. ''' | |
def __init__(self, initX, initY): | |
'''Create a new point at the origin''' | |
self.x = initX | |
self.y = initY | |
p = Point(7, 6) | |
q = Point(8, 2) | |
print(p) | |
print(q) | |
it prints: | |
<__main__.Point object at 0x00000000033DD9B0> | |
<__main__.Point object at 0x00000000033DDA20> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment