class Point:
def init(self, x, y):
self.x = x
self.y = y
def repr(self):
return f'Координаты точек {self.x},{self.y}'
def move_to(self, x, y):
self.x = x
self.y = y
class Point3D(Point):
def init(self, x, y, z):
self.z = z
Point.init(self, x, y)
def repr(self):
return f'{Point.repr(self)},{self.z} '
def move_to(self, x, y, z):
self.z = z
Point.move_to(self, x, y)
def move_by(self, x, y, z):
self.x += x
self.y += y
self.z += z
p3d = Point3D(1, 2, 3)
p3d.move_by(2, 5, 7)
print(p3d)