from random import shuffle
from time import sleep
gamenum = input ('Please enter the number of Lotto games:')
for i in range(int(gamenum)):
balls = [x+1 for x in range(45)]
rat = []
for j in range(6):
shuffle(balls)
unmber = balls.pop()
ret.append(number)
ret.sort()
print('Lotto number[%d]:'%(i+1), end=")
print(ret)
sleep(1)
If you keep running, you'll get an error I typed it exactly as it was in the example How do I fix the error?
python
print('lotto number[%d]:'%(i+1), end=")
instead of
print('lotto number[%d]:'%(i+1), end="")
Quotation not included in end=".
© 2024 OneMinuteCode. All rights reserved.