Exercise 1 solution (Python) import math def bearing(e1, n1, e2, n2): return round(math.degrees(math.atan2(e2 - e1, n2 - n1)) % 360) def distance(e1, n1, e2, n2): return math.hypot(e2 - e1, n2 - n1) legs = [((1000, 2000), (4000, 6000)), ((4000, 6000), (4000, 9000)), ((4000, 9000), (1000, 2000))] for (e1, n1), (e2, n2) in legs: print(f"{bearing(e1, n1, e2, n2):03d} deg {distance(e1, n1, e2, n2):.0f} m") Output: 037 deg 5000 m 000 deg 3000 m 203 deg 7616 m Bearings are measured clockwise from north (grid north), so atan2 takes the easting difference first and the northing difference second, the opposite order to the usual maths convention. The % 360 turns negative angles into the 0 to 359 range. The first leg is a 3-4-5 triangle scaled up, so it is 5000 m long on a bearing of about 37 degrees. These are grid bearings: correct for magnetic variation before using them on a compass.