Add 3d objects

This commit is contained in:
2024-06-11 02:13:16 +02:00
parent a50fc34ed2
commit 41cab8c2ac
4 changed files with 112 additions and 324 deletions

View File

@@ -0,0 +1,17 @@
from typing import Type
class Point3D:
def __init__(self, x: int, y: int, z: int):
self.x = x
self.y = y
self.z = z
def copy(self):
return Point3D(self.x, self.y, self.z)
def coordinates(self):
return (self.x, self.y, self.z)
def __repr__(self):
return f"Point2D(x: {self.x}, y: {self.y}, z: {self.z})"