Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- score = 0
- value = {'2', '3', '4', '5', '6', '7', '8', '9', '10', 'JACK', 'QUEEN', 'KING', 'ACE'}
- cards = []
- for card in value:
- if score <= 21:
- if 0 < len(card) < 2:
- score += int(card)
- cards.append(card)
- else:
- score += 10
- cards.append(card)
- if score > 21:
- score -= score - 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement