Skip to content

Commit 95cb384

Browse files
committed
Working on fixing blackjack advice
1 parent d4b1665 commit 95cb384

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

code/kelin/labs/lab04_blackjack_advice.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# First, ask the user for three playing cards (A, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, or K).
55
# Then, figure out the point value of each card individually. Number cards are worth their number, all face cards are worth 10.
66
# At this point, assume aces are worth 1. Use the following rules to determine the advice:
7+
"""Add user input 3 cards, 1 deck, and Give advice based on those cards"""
8+
79

810
deck_one = ['A','2','3','4','5','6','7','8','9','10','J','Q','K','A','2','3','4','5','6','7','8','9','10','J','Q','K','A','2','3','4','5','6','7','8','9','10','J','Q','K','A','2','3','4','5','6','7','8','9','10','J','Q','K']
911
deck_two = ['A','2','3','4','5','6','7','8','9','10','J','Q','K','A','2','3','4','5','6','7','8','9','10','J','Q','K','A','2','3','4','5','6','7','8','9','10','J','Q','K','A','2','3','4','5','6','7','8','9','10','J','Q','K']
@@ -68,3 +70,4 @@
6870
# Aces can be worth 11 if they won't put the total point value of both cards over 21. Remember that you can have multiple aces in a hand.
6971
# Try generating a list of all possible hand values by doubling the number of values in the output whenever you encounter an ace.
7072
# For one half, add 1, for the other, add 11. This ensures if you have multiple aces that you account for the full range of possible values.
73+

0 commit comments

Comments
 (0)