Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Point3d:
- x = 0
- y = 0
- z = 0
- def __init__(self, x, y, z):
- self.x = x
- self.y = y
- self.z = z
- def __repr__(self):
- return "(%d,%d,%d)" % (self.x, self.y, self.z)
- elenco_punti = []
- numero_punti = int(input("N punti: "))
- for p in range(numero_punti):
- x = int(input("x: "))
- y = int(input("y: "))
- z = int(input("z: "))
- punto_letto = Point3d(x,y,z)
- elenco_punti.append(punto_letto)
- print(elenco_punti)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement