Exercise 3 solution (Python) def to_min(t): h, m = t.split(":") return int(h) * 60 + int(m) def to_clock(mins): return f"{mins // 60:02d}:{mins % 60:02d}" def naismith(dist_km, ascent_m): return round(dist_km * 12 + ascent_m / 100 * 10) def route_card(legs, start, escape): clock = to_min(start) print("From To Dist Ascent Time Arrive Escape") for name_a, name_b, dist, ascent in legs: mins = naismith(dist, ascent) clock += mins print(f"{name_a:<9} {name_b:<9} {dist:4.1f} {ascent:5d} {mins:4d} {to_clock(clock)} {escape[name_b]}") legs = [("Start", "Bridge", 2.0, 0), ("Bridge", "Col", 3.0, 350), ("Col", "Summit", 2.9, 330)] escape = {"Bridge": "back to road", "Col": "south track", "Summit": "retrace to Col"} route_card(legs, "09:00", escape) Output: From To Dist Ascent Time Arrive Escape Start Bridge 2.0 0 24 09:24 back to road Bridge Col 3.0 350 71 10:35 south track Col Summit 2.9 330 68 11:43 retrace to Col The clock variable carries the arrival time forward from leg to leg, so each row shows when you should reach that point. On the day, write your actual arrival beside each planned one: if you are falling behind, the escape column tells you what to do about it.