# Exercise 2: how much of a floating iceberg shows above the water? # Archimedes: the submerged fraction = density of ice / density of the liquid. RHO_ICE = 917 liquids = {"fresh water": 1000, "sea water": 1025} for name, rho in liquids.items(): below = RHO_ICE / rho print(f"In {name:11s} {below * 100:4.1f}% is below, {100 - below * 100:4.1f}% is above") height = 100 # an iceberg 100 m tall in total above = height * (1 - RHO_ICE / 1025) print(f"A 100 m iceberg in the sea shows about {above:.1f} m above the surface") # About one tenth shows (10.5% in sea water). The old saying "tip of the iceberg" is about right.