[Solved]Create Program Python Uses Deck Card Classes Provided Create Game Goal Higher Score Dealer Q37191173
Create a program I python that uses the deck and card classesprovided. Create a game with the goal is to have a higher scorethan the dealer without going over 21 points. Please read therequirements. It must have the following features:
- first: ask the user for the number of players.(1 – 5 players)
- Each player starts with $100 in their account
- A player can continue until they are out of money
- second: Prompt each player one at a time fortheir bet amount. (minimum bet is $5 or their entire balance)
- third: Display the current balance for eachuser as part of their prompt
- fourth: Deal the cards
- After dealing all cards, display the dealer’s second card
- Each player gets two cards, meaning there will be two cycles ofdealing cards to each player.
- Cards are dealt one at a time beginning with player 1 andending with the dealer
- Each round will have a fresh deck of shuffled cards
- Show the player hand
- Ask the player if they’d hit (take another card) or hold
- Repeat until they hold or bust (total of cards is over 21)
- If they bust they lose
- If the player holds then the next player goes
- After all players are done the dealer complete its turn
- Display both dealer cards (print each on a new line)
- Use time.sleep() to wait for 1 second before dealing anothercard(s) to the dealer
- The dealer must take a card until its total is 17 orhigher
- If the dealer’s initial hand is 17 or higher it does not take acard
- Use appropriate messages so the players know what the dealer isdoing
- Ex: “The dealer takes a card” / “The dealer busts” / “Thedealer holds”
- Determining winners
- If the dealer busts (goes over 21), all players who did notbust win
- If the player and dealer totals are the same they tie
- If the players hand is lower than the dealer, the playerloses
- Use appropriate messages to let each player know what theirresult is
- Player payouts
- Win – add the amount bet to the player’s balance
- Tie – neither add nor subtract from he player’s balance
- Lose – subtract the amount bet from the player’s balance
- Display each user’s balance (including those who have lost alltheir money)
- fifth: For each player starting with player 1
- Show the player hand
- Ask the player if they’d hit (take another card) or hold
- Repeat until they hold or bust (total of cards is over 21)
- If they bust they lose
- If the player holds then the next player goes
- fifth: After all players are done the dealercomplete its turn
- Display both dealer cards (print each on a new line)
- Use time.sleep() to wait for 1 second before dealing anothercard(s) to the dealer
- The dealer must take a card until its total is 17 orhigher
- If the dealer’s initial hand is 17 or higher it does not take acard
- Use appropriate messages so the players know what the dealer isdoing
- Ex: “The dealer takes a card” / “The dealer busts” / “Thedealer holds”
- sixth: Determining winners
- If the dealer busts (goes over 21), all players who did notbust win
- If the player and dealer totals are the same they tie
- If the players hand is lower than the dealer, the playerloses
- Use appropriate messages to let each player know what theirresult is
- seventh: Player payouts
- Win – add the amount bet to the player’s balance
- Tie – neither add nor subtract from he player’s balance
- Lose – subtract the amount bet from the player’s balance
- Display each user’s balance (including those who have lost alltheir money)
NOTES:
- Card values
- Numeric cards are worth the same number of points
- Ace is worth eleven points unless the total of all cardsexceeds 21, then it is counted as one.
- Jack, Queen, and King are worth 10 points
GIVEN CODE:

![Lass Card: def init_(self, value): self.__value- value self.__suits C Spades, Clubs, Hearts, Diamonds ] self.--ranks](https://media.cheggcdn.com/media%2Fec0%2Fec018bd6-0025-40ff-8b8b-facf1ccd4912%2FphpvdwPVL.png)
We were unable to transcribe this imageLass Card: def init_(self, value): self.__value- value self.__suits C” Spades”, “Clubs”, “Hearts”, “Diamonds “] self.–ranks = [“Ace”, “Two”, “Three”, “Four”, “Five”, “Six”, “Seven”, “Eight”, “Nine”, “Ten”, “Jack”, “Queen”, “King”] def getRank(self) self.–ranks[self.–value % 13] return def getSuit(self) return self.__suits[self._value // 13] def getCardValue(self) return self.–value % 13 + 1 def getDeckValue(self) return self.__value def getNickName(self) nickname = “” if self.getCardValue) > 1 and self.getCardValueO < 11: nickname += str(self.getCardValue()) else: nickName self.getRankO 0] nickName += self.getSuit() [0] return nickName # Dunder to return a string representation to print() and format() def str_(self return self.getRankO+”of” self.getSuitO # Dunder to return a string representation to other usages def .repr(self) return self.__str__O Show transcribed image text
Lass Card: def init_(self, value): self.__value- value self.__suits C” Spades”, “Clubs”, “Hearts”, “Diamonds “] self.–ranks = [“Ace”, “Two”, “Three”, “Four”, “Five”, “Six”, “Seven”, “Eight”, “Nine”, “Ten”, “Jack”, “Queen”, “King”] def getRank(self) self.–ranks[self.–value % 13] return def getSuit(self) return self.__suits[self._value // 13] def getCardValue(self) return self.–value % 13 + 1 def getDeckValue(self) return self.__value def getNickName(self) nickname = “” if self.getCardValue) > 1 and self.getCardValueO
Expert Answer
Answer to Create a program I python that uses the deck and card classes provided. Create a game with the goal is to have a higher … . . .
OR

