# Exercise 1: height of a cone from its slope and base radius import math def height(base_radius_km, slope_deg): return base_radius_km * math.tan(math.radians(slope_deg)) for slope in (2, 3, 5): for r in (20, 50, 100): print(f"slope {slope} deg, base radius {r:3d} km -> height {height(r, slope):5.2f} km") # slope 2 deg, base radius 20 km -> height 0.70 km # slope 2 deg, base radius 50 km -> height 1.75 km # slope 2 deg, base radius 100 km -> height 3.49 km # slope 3 deg, base radius 20 km -> height 1.05 km # slope 3 deg, base radius 50 km -> height 2.62 km # slope 3 deg, base radius 100 km -> height 5.24 km # slope 5 deg, base radius 20 km -> height 1.75 km # slope 5 deg, base radius 50 km -> height 4.37 km # slope 5 deg, base radius 100 km -> height 8.75 km # A shield's slope is a few degrees, so only a very wide base gives real height. # Doubling the base radius doubles the height; a 3 degree slope over 50 km is ~2.6 km.