mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
12 lines
331 B
Python
12 lines
331 B
Python
class Point:<fold text='...'>
|
|
def __init__(self, x=0, y=0):<fold text='...'>
|
|
self.x = x
|
|
self.y = y</fold>
|
|
|
|
def distance_from_origin(self):<fold text='...'>
|
|
return (self.x ** 2) + (self.y ** 2) ** 0.5</fold></fold>
|
|
|
|
# This is a comment
|
|
p = Point(3,4)
|
|
print "p.x = %d" % (p.x)
|
|
print "p.y = %d" % (p.y) |