Riddle:

Take a wire stretched between two posts, and have a large number of birds land on it at random. Take a bucket of yellow paint, and for each bird, paint the interval from it to its closest neighbor. The question is: what proportion of the wire will be painted? More strictly: as the number of birds goes to infinity, what is the limit of the expected value of the proportion of painted wire, assuming a uniform probability distribution of birds on the wire?

Python Solution:

Riddle Source:

https://www.cut-the-knot.org/Curriculum/Probability/BOW1.shtml