X + 83 #replace this with your implementation 84 return 0 85 86 87 def check_cards (player): 88 89 90 91 92 def create blackjack_game (user_input): 93 94 95 96 97 98 99 100 101 102 103 104 Les 106 107 108 109 110 111 112 113 114 115 116 117 118 118 120 121 122 123 124 125 blackjack.py 126 127 128 #replace this with your implementation pass # FIRST SECTION INSERT YOUR CODE HERE #REPLACE WITH YOUR CODE if not user_input: player_action=input('press h to hit, s to stand, a to quit.').lower().strip (linesep) while player_action not in ('s', 'h', 'q'): player_action=input('press h to hit, s to stand, q to quit.').lower().strip(linesep) else: player_action= user_input.pop(0) if player_action == 'q': return 0 while player_action != 'q': if player_action == 'h': pass #SECOND SECTION INSERT YOUR CODE HERE #REPLACE WITH YOUR CODE else: while True: #THIRD SECTION INSERT YOUR CODE HERE #REPLACE WITH YOUR CODE else: pass if not user input: player_action=input('press h to hit, s to stand, a to quit.).lower().strip (linesep) while player_action not in ('s', 'h', 'a'): player_action=input('press h to hit, s to stand, a to quit.').lower().strip(linesep) if player_action == 'q': return 0 player_action=user_input.pop(0)

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter8: Arrays
Section: Chapter Questions
Problem 7E
icon
Related questions
Question
Extend the implementation of blackjack to work with multiple decks. This involves creating several decks and then executing the same logic, as mentioned previously, for the blackjack game. Note that with multiple decks, it’s possible to get multiple copies of the same card. For example, a player may get a hand consisting of (‘clubs’, 2), (‘clubs’, 2), and so on. Further extend the implementation of blackjack with cheat decks (or missing cards); that is, create decks with known missing cards and ensure that the blackjack logic still works. For example, it should be possible to create decks consisting entirely of Aces and picture cards. This would drastically increase the number of times either player has a hand consisting of a value of 21. Create a “card counting” scheme to keep track of the running count. First, you will need to extend the game logic to create a discard pile. The discard pile contains all the cards that have been used in the previous hands and starts off empty. Create a system that tracks the cards the player has observed and use this information to display the probability of a player drawing a picture card. For this, you should assume that the deck is a complete standard deck. This probability should be printed to the screen and should be “live” in that it updates each time a card is revealed to the player. Task This task will be manually graded by your instructor to check that the goals and the requirements for the task have been met.
M
ur
t
ne
M
83
84
85
86
87 def check_cards (player):
88
89
94
95
96
97
98
w
90
91
92 def create_blackjack_game (user_input):
93
# FIRST SECTION INSERT YOUR CODE HERE
# REPLACE WITH YOUR CODE
99
199
100
101
102
103
104
105
500
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
5.00
122
haa
123
X +
#replace this with your implementation
return 0
124
125
126
127
128
blackjack.py
%
# replace this with your implementation
pass
if not user_input:
player_action=input('press h to hit, s to stand, g to quit.').lower().strip (linesep)
while player_action not in ('s', 'h', 'q'):
player_action=input('press h to hit, s to stand, a to quit.).lower().strip (linesep)
else:
/12
player_action = user_input.pop(0)
if player_action == 'q':
return 0
while player_action != 'q':
if player_action == 'h':
pass
# SECOND SECTION INSERT YOUR CODE HERE
# REPLACE WITH YOUR CODE
else:
while True:
# THIRD SECTION INSERT YOUR CODE HERE
#REPLACE WITH YOUR CODE
INSER
pass
if not user_input:
player_action=input('press h to hit, s to stand, q to quit.).lower().strip (linesep)
while player_action not in ('s', 'h', 'q'):
else:
player_action=input('press h to hit, s to stand, a to quit.').lower().strip (linesep)
if player_action == 'q':
return 0
player_action = user_input.pop()
MacBook Pro
Search or type URL
A
&
*
+
Transcribed Image Text:M ur t ne M 83 84 85 86 87 def check_cards (player): 88 89 94 95 96 97 98 w 90 91 92 def create_blackjack_game (user_input): 93 # FIRST SECTION INSERT YOUR CODE HERE # REPLACE WITH YOUR CODE 99 199 100 101 102 103 104 105 500 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 5.00 122 haa 123 X + #replace this with your implementation return 0 124 125 126 127 128 blackjack.py % # replace this with your implementation pass if not user_input: player_action=input('press h to hit, s to stand, g to quit.').lower().strip (linesep) while player_action not in ('s', 'h', 'q'): player_action=input('press h to hit, s to stand, a to quit.).lower().strip (linesep) else: /12 player_action = user_input.pop(0) if player_action == 'q': return 0 while player_action != 'q': if player_action == 'h': pass # SECOND SECTION INSERT YOUR CODE HERE # REPLACE WITH YOUR CODE else: while True: # THIRD SECTION INSERT YOUR CODE HERE #REPLACE WITH YOUR CODE INSER pass if not user_input: player_action=input('press h to hit, s to stand, q to quit.).lower().strip (linesep) while player_action not in ('s', 'h', 'q'): else: player_action=input('press h to hit, s to stand, a to quit.').lower().strip (linesep) if player_action == 'q': return 0 player_action = user_input.pop() MacBook Pro Search or type URL A & * +
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning