MadisonBargas1593 MadisonBargas1593
  • 21-02-2020
  • Computers and Technology
contestada

A poker hand consists of 5 cards drawn at random without replacement from a 52 card deck. Using python and the cards data frame you imported, draw a poker hand by sampling from the cards and displaying the resulting sample.

Respuesta :

Imoleowojori
Imoleowojori Imoleowojori
  • 21-02-2020

Answer:

# Python program to shuffle a deck of card

# importing modules

import itertools, random

# make a deck of cards

deck = list(itertools.product(range(1,14),['Spade','Heart','Diamond','Club']))

# shuffle the cards

random.shuffle(deck)

# draw five cards

print("You got:")

for i in range(5):

  print(deck[i][0], "of", deck[i][1])

Output

You got:

5 of Heart

1 of Heart

8 of Spade

12 of Spade

4 of Spade

Explanation:

Answer Link

Otras preguntas

What ideas did the writers of the U.S Constitution borrow from the Roman government?
If angle LNM =8x+12 and angle JNL =12x-32, find the measure of angle JNP.(JNP and LNM are congruent.
out of 45 times at bat, raul got 19 hits, find rauls batting average as a decimal rounded to the nearest thousandth
To get to level 3 in a game, a player must score 14,175 points. Ann scores 14,205 points, Ben scores 14,089 points, and Chuck scores 10,463 points. Which score
What ideas did the writers of the U.S Constitution borrow from the Roman government?
what kind of lens does a nearsighted person need
How to solve 2.25t+5=13.5t+14
what is the answer for this question, 800 is 10 times as much as _____.
Divide use partial quotients 36 divided by 540
.What is the value of the expression 6m + m - 4(-2m + 1 - m) when m = -8