Odds of coin flipping heads 10 times in a row
<p>I can easily find the number of heads out of 100 and the chances of coin flipping heads out of 100 flips. That code is below.  However, I can't figure out how to easily get the odds of coin flipping heads 10 times <em>in a row</em>.</p>

<pre><code>import random

n = int(input("Enter the number of flips: "))

sum = 0
heads = 0
tails = 0
for n in range(1, n + 1):
    number = random.randrange(0,2)
    if number == 0:
        heads += 1
    else:
        tails += 1
    sum += number
    odds = sum / n


print("No. of heads: ", heads)
print("No. of tails: ", tails)
print("Odds: ", odds)
</code></pre>