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 Are the Components of a Web Address? *​
the force to move something toword you is called​
How many Protons, Electrons and Neutrons does Helium-6 have?
¨...to get lost in the new/ and strangely familiar feeling/ of fatherhood. ¨ What figurative language is this? A. metaphor B. alliteration C. personification D.
Find the missing angle.
50 points! Please help you guys! Explain how you can use the perpendicular bisector of a segment to draw an isosceles triangle. Draw a picture if you can.
Helppppp please!!! D: Find the perimeter of the trapezoid below: Please no cap!!
if your smart what is 1 + 1= ?​
A choir teacher is dividing 15 sopranos and 36 altos into the singing groups. He wants each group to have the same combination of sopranos and altos, with no si
person drinks a glass of iced water and the volume of sweat they secrete decreases.This is an example of which characteristic of living organisms? ​