Question: This is a blackjack program. In the beginning, you have $ 1 0 0 0 to play the game. You and the dealer are given
This is a blackjack program. In the beginning, you have $ to play the game.
You and the dealer are given a deck of cards shuffled.
For each game, you need to bet some money, say x dollars.
if you win, your total money x
if you lose, your total money x
if you tie with the program, your money has no change.
Game Rules:
At first, you, the player, need to bet some money.
Reuse the HWA function to draw two card from the top of the deck for the player.
add two the points of the two cards for the player
Do the same for dealer in the same manner.
Hide dealer's cards and total points to player. Display only player's cards and points.
After you see your first two cards, you have the more chances to draw an additional card hit You also can pass stand without drawing any more cards. If total points it goes bust, then points
If you draw an additional card, dealer will do the same.The bust also applies to the dealer.
Display all physical cards and total points yours and dealer
Compare your total points with dealer's:
if yours is higher than the dealer's, you win
if equal, tie
if yours is lower, you lose
Now you finish one game.
The program will ask if the player plays again or not. Player can play until you want to quit or no more money left or not card left in the deck. Finally, the game is over. Print out the player's balance$ amount
Ignore the BlackjackIf you start Ace &
'Hit': ask for another card.
'Stand':hold your total and end a game.
'Bust': over points
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
