I have 40 cards. 10 yellow. 10 red. 10 blue and 10 green. I need to pick 25 random cards, and then give them to 500 people. Each one needs to guess the right color for each of the 25 cards.
This is what I have done so far:
import random
nSuits = 4 # yellow/red/blue/green
nCards = 25 # Number of random cards
nPlayers = 500
def Random_guess():
randomCards = [random.randrange(nSuits) for i in range(nCards)]
randomGuesses = [random.randrange(nSuits) for i in range (nPlayers)]
The randomCards
works fine according to the shell, but I can't find a way to attribute the random cards to each player and to their guess from the 4 colors.
Any suggestion?