Advertisement
Spocoman

Point Of Segment(Ternary Operator)

Oct 1st, 2023
1,201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. first = int(input())
  2. second = int(input())
  3. point = int(input())
  4.  
  5. print("in" if first >= point >= second or first <= point <= second else "out")
  6. print(min(abs(first - point), abs(second - point)))
  7.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement