Tip:
Highlight text to annotate it
X
Okay, time for a quiz, and in this quiz
I'm going to ask you to write a function,
and what I'm going to ask you to do is to define the function called deal,
which will deal out some hands so that we can actually play some poker.
And you should give this deal function the number of hands
that you want dealt, the number of players,
and we'll optionally allow you to define
the number of cards in each hand.
For regular poker that will be 5, but there's other games
where you deal out 7 or other numbers of cards.
We want to allow for that too to make the deal function
a little bit more general.
Your task is to define the function with that signature
that would return a list of numhands different poker hands.
Each one has n cards, and I'll give you a hint
that you should look at the Python module
called "random" and look up to see if there's something there
that can help you shuffle the cards, so what deal will do
is take a deck, shuffle it, and then deal out those hands
and return the value of those hands.