Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import choice
- def deck():
- cards = range(1, 12)
- return choice(cards)
- def diack():
- card1= deck()
- card2 = deck()
- hand = card1 + card2
- print hand
- if hand < 21:
- print raw_input("Would you like to hit or stand?")
- if "hit":
- return hand + deck()
- elif "stand":
- return hand
- choice = raw_input("Would you like to hit or stand?")
- print choice
- if choice == "hit":
- return hand + deck()
- elif choice == "stand":
- return hand
- print raw_input("Would you like to hit or stand?")
- if "hit":
- return hand + deck()
- elif "stand":
- return hand
- cmd = raw_input("Would you like to hit or stand?")
- if cmd == "hit":
- return hand + deck()
- elif cmd == "stand":
- return hand
Add Comment
Please, Sign In to add comment