Advertisement
GalinaKG

02. Center Point

Jun 11th, 2022
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. from math import floor
  2.  
  3.  
  4. def center_point(x1, y1, x2, y2):
  5.     first_point_sum = abs(x1) + abs(y1)
  6.     second_point_sum = abs(x2) + abs(y2)
  7.  
  8.     if first_point_sum <= second_point_sum:
  9.         print(f'({floor(x1)}, {floor(y1)})')
  10.     else:
  11.         print(f'({floor(x2)}, {floor(y2)})')
  12.  
  13.  
  14. center_point(x1=float(input()), y1=float(input()), x2=float(input()), y2=float(input()))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement