Advertisement
simeonshopov

Point in the Figure

Sep 24th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. h = int(input())
  2. x = int(input())
  3. y = int(input())
  4.  
  5. if (0 < x < 3*h and 0 < y < h) or (h < x < 2*h and 0 < y < 4*h):
  6.   print("inside")
  7. elif (0 <= x < h and h < y <= 4*h) or (2*h < x <= 3*h and h < y <= 4*h) or y < 0 or x < 0 or y > 4*h or x > 3*h:
  8.   print("outside")
  9. else:
  10.   print("border")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement