I'm trying to make a lottery in python and I keep getting this error.

There's an error in your program:
***Cant assign to operator.(Mega Millions, line 47)


Here's the code.


import random

for i in range(1):
    RN1 = random.randint(1,75)

for i in range(1):
    RN2 = random.randint(1,75)

for i in range(1):
    RN3 = random.randint(1,75)

for i in range(1):
    RN4 = random.randint(1,75)

for i in range(1):
    RN5 = random.randint(1,75)

for i in range(1):
    RMB = random.randint(1,15)

x = raw_input('Money in pennys.')
Plays = int(x) * 100
plays = int(x) * 100
z = 0
Game = ('Game')
while Plays != 0:
    Plays = Plays - 1
    z = z + 1
    for i in range(1):
        N1 = random.randint(1,75)

    for i in range(1):
        N2 = random.randint(1,75)

    for i in range(1):
        N3 = random.randint(1,75)

    for i in range(1):
        N4 = random.randint(1,75)

    for i in range(1):
        N5 = random.randint(1,75)

    for i in range(1):
        MB = random.randint(1,15)

    Game + z = N1 + N2 + N3 + N4 + N5 + MB

z = 0
while plays != 0:
    Plays = Plays - 1
    z = z + 1
    print(Game + str(z))





Line 47 in highlighted in red.
I'm not finished with the program and I put Plays = int(x) * 100,
plays = int(x) * 100
on purpose.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to