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

when we divide 2√3 by 2√3 it gives 3 how ?(2√3/2√3)
Provide an appropriate response. 39) Find a set of 7 scores that has the same mean but a smaller standard deviation than the set {65, 71, 77, 80, 82, 90, 96}.
simplify please! find the solution.
y=2x+1 find the slope and y-intercept
How many subsets does the set {1, 2, 3} have?
a rectangular plot of land is 100 feet long and 50 feet wide how long is the walkway along the diagonal? round to the nearest foot.
How would you algebraically factor x squared minus 15?
F(x)=1\3x^2+3x-18 Please help with steps
Can you solve for t in -100=12t-4?
4 friends share 3 apples equally. What fraction of the apple does each friend get ?