# Is this function for cross product right?

This:

class Point:
...
def cross_product(self, other):
return self.x * other.y - self.y * other.x
...


It returns a scalar, which isn't quite right, but since this is working on 2D Points, you can probably just treat it as a scalar, because the cross product of two 2D points is (0, 0, someZ).

Solution:

TL;DR You can't compute the cross product of 2 2d vectors.

You can, technically, if you treat the 2D vectors as 3D vectors with z of zero.