Building Useful Classes, what's wrong please?


<Below this line, add a link to the exact exercise that you are stuck at.>
<In what way does your code behave incorrectly? Include ALL error messages.>
Here’s my code:
<What do you expect to happen instead?>
I got the following message:
Oops, try again. It looks like you didn’t print “(1, 2, 3)”


class Point3D(object):
“”" Points in 3D"""
def init(self,x,y,z):
self.x = x
self.y = y
self.z = z

def __repr__(self):
    y = "(%d,%d,%d)" % (self.x, self.y, self.z)
    return str(y)

my_point = Point3D(1,2,3)
print my_point

The output is: (1,2,3).


Just return y and omit str()


White space needed. Check the error message.


the correct answer…