Question: Homework 9 B: DUELING BLACKJACK BlackJack Twixt 2 Players plus 1 Dealer Program 9 - 1 simulates pulling cards from a deck and Program 9

Homework 9B: DUELING BLACKJACK
BlackJack Twixt 2 Players plus 1 Dealer
Program9-1 simulates pulling cards from a deck and Program9-1B (see attached) simulates a single player playing BlackJack against a dealer.
Enhance this approach by creating a BlackJack game between two virtual players. This particular version is called: Dueling BlackJack. The cards have the values given in Program9-1 and Program9-1B, with the following caveat:
Aces will take the value of 11 as long as the sum total of the cards in a person's hand does not exceed 21.
o If the sum total does exceed 21, the Ace will take the value of 1.
Call your program
YourName-Hwrk9B.py
Every time a new game is begun, your name should appear first, at the top, showing whose casino the players are playing at.
DUELING BLACKJACK: Here are the Rules
The program should deal cards to each player, one card at a time, until one player's hand is worth more than 21 points.
Each time one card is given to each player, this is called a deal (e.g. deal 1, deal 2, etc.)
When, in a particular deal, one person's hand exceeds 21, the other player is declared the winner. The game is over.
When one person attains a score of exactly 21 points, that person will receive no further draws. The other player will continue to receive draws until (s)he exceeds 21 or gets the score of 21.
The players have no choice here, they must accept a hit or not according to this rule.
If both players get a score of 21, then the outcome is a Tie Score and both players win. This is the one instance in which the Dealer is said to lose.
It is possible that both players' hands will simultaneously exceed 21 points, in which case neither player wins, hence the Dealer is said to win.
Remember, If a player is dealt an ace, the program decides the value of the card according to the following rule:
The ace will be worth 11 points, unless that makes the player's hand exceed 21 points. In that case the ace will be worth 1 point
Tips for Insuring Cards are Dealt Randomly
You will want to use the Random() function to ensure that your cards are selected randomly.
For example, when a player receives a card from the dealer, there are three steps involved:
The first step ensures that a particular card is chosen randomly from the deck.
The second step removes that card from the deck, and it is given to the player.
The third step adds that card's value to the player's current hand.
Homework 9B: Dueling BlackJack Simulation
Here are some possible Outcomes:
o Run #1
Homework 9B: Dueling BlackJack Simulation
Here are some possible Outcomes:
o Run #2
Homework 9B: Dueling BlackJack Simulation
Here are some possible Outcomes:
o Run #3Both Hand1 & Hand2 Lose, only the Dealer Wins!
Homework 9B: Dueling BlackJack Simulation
Here are some possible Outcomes:
o Run #5Both Hand1 and Hand2 Win!
Homework 9B: Dueling BlackJack Simulation
Here are some possible Outcomes:
o Run #6Both Hand1 and Hand2 Win!
Homework 9B: Dueling BlackJack Simulation
Here are some possible Outcomes:
o Run #3Both Hand1 & Hand2 Lose, only the Dealer Wins!
does the program give you the correct result when hand 1 wins?
does the progrsm give you the
correct result when hand 2 wins
does the program give the correct reseult when both hands exceed 21
does the progrsm skip desling an additional card to hand thay already has 21
does program make ace =11 when the total is <=21
does the program make ace =1 when the total would be greater than 21 otherwise

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!