Programmin-in-Python

Program that converts Whole Circle Bearing to Reduced Bearing

Dec 10th, 2021
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. wcb = 327
  2.  
  3. if (0<=wcb<=90):
  4.     rb = f"N {wcb} E" if wcb!=360 else f"N 0 E"
  5. elif 90<wcb<=180:
  6.     rb = f"S {180-wcb} E"
  7. elif 180<wcb<=270:
  8.     rb = f"S {wcb-180} W"
  9. else:
  10.     rb = f"N {360-wcb} W"
  11.  
  12. print(rb)
Advertisement
Add Comment
Please, Sign In to add comment