Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = list(map(float, input().split()))
- x1 = a[0]
- y1 = a[1]
- x2 = a[2]
- y2 = a[3]
- x3 = a[4]
- y3 = a[5]
- class Vector:
- def __init__(self, x, y):
- self.x = x
- self.y = y
- def __mul__(left,right):
- return (left.x * right.y- left.y*right.x)
- a=Vector(x2-x1,y2-y1)
- b=Vector(x3-x1,y3-y1)
- print(abs (a * b / 2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement