import random
Q = int(input('drawing lots!') Please enter a quota.')
numbers = list(range(1, Q + 1))
R1 = random.choice(numbers)
print('{} and''.format.(R1))
numbers.remove(R1)
R2 = random.choice(numbers)
print('It's the same pair as '{}' format(R2))
numbers.remove(R2)
The invalid syntax error appears, but I don't know what's wrong. I don't know what to do if I want to repeat picking and erasing numbers.
python3 list infinite function
Q = int(input() drawing lots!! Please enter a quota.')
One is missing
Q = int(input() drawing lots!! Please enter a quota.'))
Correct that.
© 2024 OneMinuteCode. All rights reserved.