Advertisement
desislava_topuzakova

01. Point on Rectangle Border

May 3rd, 2020
641
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. #x1, y1, x2, y2, x и y
  2. x1 = float(input())
  3. y1 = float(input())
  4. x2 = float(input())
  5. y2 = float(input())
  6. x = float(input())
  7. y = float(input())
  8.  
  9. check1 = (x == x1 or x == x2) and (y1 <= y <= y2)
  10. check2 = (y == y1 or y == y2) and (x1 <= x <= x2)
  11.  
  12. if check1 or check2:
  13.     print('Border')
  14. else:
  15.     print('Inside / Outside')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement