Advertisement
Programmin-in-Python

Program that converts degrees to degrees, minutes, seconds

Dec 10th, 2021
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.13 KB | None | 0 0
  1. d = 317.4556
  2.  
  3. mins = (d - int(d))*60
  4. secs = (mins - int(mins))*60
  5.  
  6. print(f"{int(d)} deg {round(mins, 2)} min {round(secs, 2)} sec")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement