Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- def result_coord(co_a1, co_b1, co_a2, co_b2):
- distance1 = math.sqrt(co_a1 ** 2 + co_b1 ** 2)
- distance2 = math.sqrt(co_a2 ** 2 + co_b2 ** 2)
- if distance1 <= distance2:
- result = f"({math.floor(co_a1)}, {math.floor(co_b1)})"
- else:
- result = f"({math.floor(co_a2)}, {math.floor(co_b2)})"
- return result
- co_x1 = float(input())
- co_y1 = float(input())
- co_x2 = float(input())
- co_y2 = float(input())
- print(result_coord(co_x1, co_y1, co_x2, co_y2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement