Advertisement
FaDaQ

A

Feb 16th, 2022
655
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. from math import sqrt
  2.  
  3. arrA = [int(input("Введите координаты точки A: ")) for i in range(2)]
  4. arrB = [int(input("Введите координаты точки B: ")) for j in range(2)]
  5.  
  6. lineA = sqrt(arrA[0]**2 + arrA[1]**2)
  7. lineB = sqrt(arrB[0]**2 + arrB[1]**2)
  8.  
  9. if lineA > lineB:
  10.     print("Точка А удалена больше!")
  11. elif lineA < lineB:
  12.     print("Точка B удалена больше!")
  13. else:
  14.     print("Точки удалены на одинаковое расстояние!")
  15.    
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement