Building Useful Classes, what's wrong please?


Here's my code:

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...