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


#1

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

#2

Without the quotes


#3

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


#4

You probably changed more than one thing.


#5

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