I've just started learning to program and am now attempting to write a blackjack program. A problem I've come across is in my way of representing a deck, here's how I did it (the suit doesn't matter to me):
A = 11
J = 10
Q = 10
K = 10
deck = [A, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K
] * 4
The problem is when face cards are 'dealt' they show a 10 (11 for A..) when I'd like them to show as J or Q or K or A.
Here's the deal function:
def deal(competitor, x):
for i in range (0,x):
card = shoe[0]
dealt.append(card)
competitor.append(card)
shoe.remove(card)
Any fixes?