Advertisement
ALEXANDAR_GEORGIEV

point_on_rectangle_border

Jun 6th, 2022
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. x1 = int(input())
  2. y1 = int(input())
  3. x2 = int(input())
  4. y2 = int(input())
  5. x = float(input())
  6. y = float(input())
  7.  
  8. if x == x1 or x == x2:
  9.     if y1 <= y <= y2:
  10.         print('Border')
  11.     else:
  12.         print('Inside / Outside')
  13. elif y == y1 or y == y2:
  14.     if x1 <= x <= x2:
  15.         print('Border')
  16.     else:
  17.         print('Inside / Outside')
  18. else:
  19.     print('Inside / Outside')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement