Browse Source

Add What If? 11 example

David Peter 2 years ago
parent
commit
418b524723
1 changed files with 17 additions and 0 deletions
  1. 17 0
      examples/what_if_11.nbt

+ 17 - 0
examples/what_if_11.nbt

@@ -0,0 +1,17 @@
+# Droppings
+#
+# If you went outside and lay down on your back with your mouth open, how long
+# would you have to wait until a bird pooped in it?
+#
+# https://what-if.xkcd.com/11/
+
+@aliases(birds)
+unit bird
+unit mouth
+unit poop
+
+let earth_radius = 6371 km
+
+let frequency = (300 billion birds / 4 pi earth_radius^2) × (1 poop / bird / hour) × (16 hours / day) × (1 mouth / poop) × (15 cm^2 / mouth)
+let period = 1 / frequency
+print(period -> years)