Building useful classes:what's wrong in my code!


#1

it's printing correct in console but still codecademy says error why?

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


#3

here:

return '(%d,%d,%d)'

the string returned needs to be an exact match, you miss a few spaces


#4

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