blob: aa6687209d17c73c4031eac0a32ee5405c28a4d8 [file] [log] [blame]
Tor Norbye3a2425a2013-11-04 10:16:08 -08001class Point:<fold text='...'>
2 def __init__(self, x=0, y=0):<fold text='...'>
3 self.x = x
4 self.y = y</fold>
5
6 def distance_from_origin(self):<fold text='...'>
7 return (self.x ** 2) + (self.y ** 2) ** 0.5</fold></fold>
8
9# This is a comment
10p = Point(3,4)
11print "p.x = %d" % (p.x)
12print "p.y = %d" % (p.y)