I don’t know why I have a TypeError here. I followed my instructor’s code, he successfully got the answer, but i can’t. Does anyone help?
class Point:
def init(self, x, y):
self.x = x
self.y = y
def draw(self):
print(f"Point({self.x}, {self.y})")
point = Point(1, 2)
print.draw()
the result is below:
Traceback (most recent call last):
File “/Users/lichangtan/Desktop/gracetan/app.py”, line 28, in
point = Point(1, 2)
TypeError: Point() takes no arguments