Popular recipes by Souman Deb http://code.activestate.com/recipes/users/457360/2003-01-23T22:53:09-08:00ActiveState Code RecipesTossing Heads and Tails (Python)
2003-01-23T22:53:09-08:00Souman Debhttp://code.activestate.com/recipes/users/457360/http://code.activestate.com/recipes/174786-tossing-heads-and-tails/
<p style="color: grey">
Python
recipe 174786
by <a href="/recipes/users/457360/">Souman Deb</a>
.
</p>
<p>This program is equivalent to tossing a coing for 100 times and for 100 attempts to obtain the number of heads and tails in the random order it also sums up the number of heads and tails that have formed so far....this is a simple program for random sample space analysis to show that even in the best of conditions the probability of a coin falling tails or heads is not exactly 1/2..but close to 1/2. The UINIVERSE is not perfect !</p>