wins on average
<p>I am just learning python (first language ever) and am implementing what I find in ways that I find fun.  I built a pseudo slot machine odds calculator.  However, it stops at one Grand prize win.  Is there a way to make it run over and over to give an average number of attempts for n amount of games to get the grand prize?</p>

<p>Here's my code</p>

<pre><code>#!/usr/bin/env python
import random

a = 1

while a &gt;0 :
    l1 = random.randrange(36)
    l2 = random.randrange(36)
    l3 = random.randrange(36)

    print l1, l2, l3
    if l1 == l2 == l3 == 7:
        print 'grand prize winner!!!'
        break
    elif l1 == l2 == l3:
        print 'you won! congratulations'
        print 'it took', a, 'attempts to win'
    else:
        a += 1
        print 'sorry...  try again'
        print 'attempt', a
</code></pre>

<p>Also, is there a way to tell me how many normal wins there were during the course of winning that grand prize</p>
