№ | Входные данные | Выходные данные |
1
|
a = Vector(Point(4, 3))
b = Vector(Point(4, -3))
print(a, b)
print(a.dot_product(b))
c = Vector(Point(-3, 4))
print(a * c)
print(a.dist())
print(a.cross_product(b))
print(b ^ c) # __xor__()
d = Vector(Point(4, 3), Point(4, -3))
print(d)
d = 5 * d
print(d)
|
(4, 3) (4, -3)
7
0
5.0
-24
7
(0, -6)
(0, -30)
|