Hello everyone, I am currently learning python on Codecademy. I am stuck at an exercise which can be reached through the following link.
The question is not very difficult. I just need to create a class and define some methods in it. I wrote the following code:-
class Point3D(object): def __init__(self,x,y,z): self.x=x self.y=y self.z=z def __repr__(self): string="(%d,%d,%d)" % (self.x, self.y, self.z) return string my_point=Point3D(1,2,3) print my_point.__repr__()
On the output console, (1 2 3) is printed when I click on the 'Save and Submit Code' button, but it does not let me go to the next level and displays an error message saying that I have not printed (1 2 3).
Please help me people. I am really stuck. Thanks in advance for your help!