<div dir="ltr"><div><div>Here is a problem I've come across, from empirical evidence, that also relates to your equation. We always assume<br></div> that their are always two probabilities, that a coin can be either head or tails. <br>
<br>However, there are dynamics within a third realm of the dimensionality of the coin...it's not a two dimensional plane. So the planar probabilities in relation to the 'surface are' hold another possibility...the 'edge'.<br>
<br></div>The algorithm of applying the edge are up to you, but I've seen the coin land on it's curved edge more than once, so this function you've designed, should have more than two possibilities, within a complete algorithm to the real world functionality of the coin in question.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 12, 2014 at 10:25 AM, Marc Eymard <span dir="ltr"><<a href="mailto:marc_eymard@hotmail.com" target="_blank">marc_eymard@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">Hello there,<br><br>I want to emulate a coin flip and count how many heads and tails when flipping it a hundred times.<br><br>I first coded <b>coinflip_WRONG.py</b> with "count_flips += 1" statement within the <b>if/else</b> block.<br>
When running it, either returned values are wrong or the script seems to enter in an infinite loop showing no return values at all.<br><br><b>coinflip.py</b> is a corrected version I worked out myself. I moved "count_flips+= 1" out of <b>if/else</b> block and inserted it before<b> if/else</b>.<br>
<br>However, I still don't understand the bug since, in my understanding, both files are incrementing variable <b>count_flips</b> each time until the loop becomes false.<br><br>Can somebody explain the reason of the bug.<br>
Cheers,<br><br>Marc<br>                                         </div></div>
<br>_______________________________________________<br>
Tutor maillist  -  <a href="mailto:Tutor@python.org">Tutor@python.org</a><br>
To unsubscribe or change subscription options:<br>
<a href="https://mail.python.org/mailman/listinfo/tutor" target="_blank">https://mail.python.org/mailman/listinfo/tutor</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Best Regards,<br><span style="font-family:arial,helvetica,sans-serif">David Hutto</span><br><i><b>CEO:</b></i> <u><a href="http://www.hitwebdevelopment.com" target="_blank">http://www.hitwebdevelopment.com</a></u><br>

</div>