Edit: I solved this. Check the bottom of the post.
I have gotten stuck in the exercise called 'Building useful classes' in the 'Classes' lesson, here.
Traceback (most recent call last): File "python", line 11, in <module> File "python", line 7, in __repr__ TypeError: not all arguments converted during string formatting
I don't know what's wrong with the code, it looks like correct. I have tried writing it differently, but it has net been working.
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)
I just rewrote the code as it was and it worked.