From Dev.to
Simulating the Two-Heads-in-a-Row Puzzle in 20 Lines of Python
You flip a fair coin until you get two heads in a row. How many flips does it take, on average? Most people say 4. It feels right: two flips for HH would be 4 if you somehow "double" a 50/50 wait. The...
