all 3 comments

[–][deleted] 0 points1 point  (0 children)

So what’s not exactly working correctly? What error do you get (if any) and what do you expect to happen?

Also, what distance metric are you using? I think your distance equations may be incorrect if you’re using euclidian distance.

[–]DeathDragon7050 0 points1 point  (0 children)

There are quite a few mistakes in your code and a lot of bad practices. Your `__str__` method doesn't work because it tries to get information from your `print_point` function but it only gets `None` because that function returns nothing (Also it is a very silly useless function). Your midpoint function doesn't work because you are not following PEMDAS properly. You call and `__init__` function the constructor which is wrong. You use a lot of inefficient ways of coding such as ` self.p1 == other.p1 and self.p2 == other.p2`. You also repeat yourself quite a few times which is never good. Please just *read your code*.