11.Building useful classes


#1

I'm not sure why this code won't pass

Here is my code:

class Point3D(object):
    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):
        
my_point = Point3D(1,2,3)
print my_point

#2

There is a stray colon at the end of the (return) line that is raising a syntax error.


#3

Thank you that was the problem