Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me in python language Program9-1 simulates pulling cards from a deck and Program9-1B (see attached) simulates a single player playing BlackJack against a

Please help me in python language

image text in transcribed

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. 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. 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. The program should deal cards to each player until one player's hand is worth more than 21 points. When that happens, the other player is the winner. 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. If both players get a score of 21, then the outcome is a Tie Score. It is possible that both players' hands will simultaneously exceed 21 points, in which case neither player wins. Remember, if a player is dealt an ace, the program should decide 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. 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. 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. 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. The program should deal cards to each player until one player's hand is worth more than 21 points. When that happens, the other player is the winner. 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. If both players get a score of 21, then the outcome is a Tie Score. It is possible that both players' hands will simultaneously exceed 21 points, in which case neither player wins. Remember, if a player is dealt an ace, the program should decide 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Business Process Driven Database Design With Oracle PL SQL

Authors: Rajeev Kaula

1st Edition

1795532386, 978-1795532389

More Books

Students also viewed these Databases questions