Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python Problem 1. Given lists of 13 cards and their suits below, create a deck of 52 cards that looks like below. deck =['Ace of

pythonimage text in transcribed

Problem 1. Given lists of 13 cards and their suits below, create a deck of 52 cards that looks like below. deck =['Ace of Hearts', 'Duece of Hearts', ,'King of Hearts', 'Ace of Dimonds', 'King of Spades']. Now use the shuffle function inside the random module to shuffle the cards. Play 5 games of poker with your friends as follows: Pick 5 cards randomly for you 5 times and 5 cards for your friend 5 times. Compare the corresponding 5 cards and decide who wins the most number of times. If you are unfamiliar with the game of poker, read https://en.wikipedia.org/wiki/List_of_poker_hands and the links therein. import random random. seed (2) cards = [ 'Ace', 'Duece', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten', 'Jack', 'Queen', 'King'] suits = ['Hearts', "Diamonds', 'Clubs', 'Spades'] \#deck = \#Random. shuffle shuffles the original deck without reassigning it to a new variable name. \# Play poker now. \# Game 1 to 5. \#random. seed(5) #i=1 \#while i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mysql Examples Explanations Explain Examples

Authors: Harry Baker ,Ray Yao

1st Edition

B0CQK9RN2J, 979-8872176237

More Books

Students also viewed these Databases questions

Question

How are models employed in SE decision making?

Answered: 1 week ago

Question

Write a note on job design.

Answered: 1 week ago

Question

Compute the derivative of f(x)cos(-4/5x)

Answered: 1 week ago

Question

Discuss the process involved in selection.

Answered: 1 week ago

Question

Differentiate tan(7x+9x-2.5)

Answered: 1 week ago