summaryrefslogtreecommitdiff
path: root/python-func/task11.py
diff options
context:
space:
mode:
Diffstat (limited to 'python-func/task11.py')
-rw-r--r--python-func/task11.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/python-func/task11.py b/python-func/task11.py
index cd759fd..a33ffee 100644
--- a/python-func/task11.py
+++ b/python-func/task11.py
@@ -6,6 +6,9 @@ class Point:
self.x = x
self.y = y
+ def __eq__(self, other):
+ return self.x == other.x and self.y == other.y
+
def dist(p1: Point, p2: Point) -> float:
return sqrt((p2.x - p1.x) ** 2 + (p2.y - p1.y) ** 2)
@@ -32,11 +35,11 @@ def solve(a: Point, b: Point, c: Point, d: Point, e: Point) -> float:
return a1 + a2 + a3
-ax, ay = map(int, input("Ax, Ay = ").split())
-bx, by = map(int, input("Bx, By = ").split())
-cx, cy = map(int, input("Cx, Cy = ").split())
-dx, dy = map(int, input("Dx, Dy = ").split())
-ex, ey = map(int, input("Ex, Ey = ").split())
+ax, ay = map(float, input("Ax, Ay = ").split())
+bx, by = map(float, input("Bx, By = ").split())
+cx, cy = map(float, input("Cx, Cy = ").split())
+dx, dy = map(float, input("Dx, Dy = ").split())
+ex, ey = map(float, input("Ex, Ey = ").split())
res = solve( Point(ax, ay)
, Point(bx, by)