Lottery random.randint help in python
<p>Heres my program so far</p>

<pre><code>import random

def lottery(lottoNumber1,lottoNumber2,lottoNumber3):
    for count in range(1):
        lottoNumber1 = random.randint(1,50)
        print(lottoNumber1)
    for count in range(1):
        lottoNumber2 = random.randint(1,50)
        print(lottoNumber2)
    for count in range(1):
        lottoNumber3 = random.randint(1,50)
        print(lottoNumber3)



    return lottoNumber1,lottoNumber2,lottoNumber3

def main():
    userChoice1 = int(input('Chose a number between 1 and 50: '))
    userChoice2 = int(input('Chose a number between 1 and 50: '))
    userChoice3 = int(input('Chose a number between 1 and 50: '))


    if userChoice1 == lottoNumber1:
        lottoNumber1 = lottery(lottoNumber1,lottoNumber2,lottoNumber3)
        print('You win $1,000')
    else:
        print('You effing suck')





main()
</code></pre>

<p>I'm getting a message error saying that lottoNumber1 is reference before the assignment in the main function.  I'm not to sure what that means.  Anyone know what I could do to make this code smoother.  I want to make it so the user has to chose 3 numbers and if he gets them equal to the 3 lotto numbers he wins 10000</p>

<p>Thanks guys.  </p>
