Question: 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
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 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
Get step-by-step solutions from verified subject matter experts
