Question: need help with this code. (python) For this lab you will create a custom class that implements a point in 3-D space. Name your class
For this lab you will create a custom class that implements a point in 3-D space. Name your class 'pt3d. The class will have three attributes, x,y,z. These x,y,z values should default to zero. Given two instances of the pt3d class a and b. implement methods such that a+b returns a new pt3d object whose X, y and z values are the sum of the a and b x, y and z values a-b returns the Euclidean distance between points a and b a==b returns true if the x, y and z values of a and b are equal, false otherwise When you call print(a) the printout should be of the format '
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
