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

e Snowy Slopes ski resort kept track of the amount of snow that fell each weekend during their busy season. This box plot shows the results. Weekend snowfall (i
Cherly paid $35.20 for a strawberry shortcake and 4 doughnuts. ria paid $50.80 for a strawberry shortcake and 10 doughnuts. how much does a strawberry shortcake
Which of the following functions has an initial value of 3/2 and a rate of change of -2/3?
how does breast feeding save infants from many disease?​
can someone pls help
Find the point-slope equation for the line that passes through the points (-2, -20) and (9, 79). Use the first point in your equation.
The square root of the sum of a number and 12 is 9. Find the number.​
Which of these expressions shows a correct way to set up the slope formula for the line that passes through the points (3, 6) and (-7, -4)?
In the graphic, X represents which element? 12 6 2x А 12 Magnesium 18 Argon Ar 6 Carbon С Mg
Need help ASAP PLEASE