Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from math import pi
- # source: https://www.google.com/search?q=volume+of+the+earth+in+cubic+miles
- volume_earth = 259875159532 # cubic miles
- # source: https://www.usgs.gov/media/images/all-earths-water-a-single-sphere
- volume_water = 332500000 # cubic miles
- water_ratio = volume_water/volume_earth # ratio of water volume to earth as a whole
- # Formulas to convert between volume and radius of a sphere
- sphere_volume = lambda radius: (4/3) * pi * radius**3
- sphere_radius = lambda volume: (volume / ((4/3)*pi))**(1/3)
- print(f"Earth radius: {sphere_radius(volume_earth):.2f} mi^3.")
- print(f"Earth's water radius: {sphere_radius(volume_water):.2f} mi^3.")
- print(f"Water accounts for {water_ratio:.5f}% of Earth's volume.")
- radius_globe = 6 # inches
- volume_globe = sphere_volume(radius_globe) # cubic inches
- volume_globe_h20 = volume_globe * water_ratio # cubic inches
- in3_to_tsp_factor = 3.32468 # conversion from in^3 to teaspoons
- volume_globe_h20_tsp = volume_globe_h20 * in3_to_tsp_factor # tsp
- print(f"Classroom globe-sized model of Earth requires {volume_globe_h20:.2f} in^3 ({volume_globe_h20_tsp:.2f} tsp) of water.")
- depth_globe_h20 = sphere_radius(volume_globe + volume_globe_h20) - radius_globe # inches
- in_to_um_factor = 25400 # conversion from in to micrometer
- depth_globe_h20_um = depth_globe_h20 * in_to_um_factor # um
- print(f"A spherical shell of that water around a classroom globe would be {depth_globe_h20_um:.2f} microns thick.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement