Advertisement
simeonshopov

Point on rectangle border

Sep 19th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. x1 = float(input())
  2. y1 = float(input())
  3. x2 = float(input())
  4. y2 = float(input())
  5. x = float(input())
  6. y = float(input())
  7.  
  8. x_range = (x == x1 or x == x2) and (y1 <= y <= y2)
  9. y_range = (y == y1 or y == y2) and (x1 <= x <= x2)
  10.  
  11. if x_range or y_range:
  12.   print("Border")
  13. else:
  14.   print("Inside / Outside")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement