# Exercise 2: find the exponent b of a valley from one measured point, then name its shape import math H, W = 600, 1000 # rim height and half-width in metres X = 500 # where the floor height was measured for name, h in (("Valley A", 280), ("Valley B", 150), ("Valley C", 100)): b = math.log(h / H) / math.log(X / W) shape = "V-shaped (river-like)" if b < 1.5 else "U-shaped (glacier-like)" print(f"{name}: floor {h} m high at x = {X} m b = {b:.2f} {shape}") # Valley A: floor 280 m high at x = 500 m b = 1.10 V-shaped (river-like) # Valley B: floor 150 m high at x = 500 m b = 2.00 U-shaped (glacier-like) # Valley C: floor 100 m high at x = 500 m b = 2.58 U-shaped (glacier-like)