11/11 Building useful classes__Stuck err what's wrong codecademy python:


11/11 building useful classes

There's no syntax error, it shows the output "(1, 2, 3)" None. Even then it says "you have not printed "(1, 2, 3)"

Can't proceed to the next exercise.

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


Without the quotes


it works! thanks
i dont understand i did the same thing before. And many other things too. I think its something with the codecademy compiler


You probably changed more than one thing.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.