Question: The game should begin by randomly dealing 2 cards to the user s hand, and then calculate and display the total. Next the program should

The game should begin by randomly dealing 2 cards to the users hand, and then calculate and
display the total.
Next the program should display a prompt, asking the user if he/she wants a Hit or to Stand.
If the user selects to Hit the game should randomly deal a new card to the users hand, and then
calculate and display the new total.
If the total is greater than 21, then the user Busts, the house wins, and a message
indicating these results is displayed.
If the total is less than 21, repeat the Hit/Stand Prompt to the user. Continue this process
until the user elects to Stand or Busts.
If the user selects to Stand, the game then randomly deals two cards to the house, and then
calculates those total points.
The dealer must continue to Hit as long as the total of the House had is under 17, display
the results after each Hit
The dealer must Stand once the House hand reaches 17 or higher. Once
If the user has not already Busted, compare the Users Hand to the House Hand and determine
and display the results. The player closes to 21 without going over wins.
Once a final game result has been displayed, prompt the user to see if he/she would like to play
again. If the user selects to play again, start the program from the beginning, otherwise display a
farewell message and terminate the program.

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 Databases Questions!