Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random;
- def printCard(card):
- if card == 11:
- print('Jack')
- if card == 12:
- print('Queen')
- if card == 13:
- print('King')
- if card == 14:
- print('Ace')
- else:
- print(card)
- playerOneCards = []
- playerTwoCards = []
- playerOneName = input('Enter name for player one:')
- for i in range(4):
- playerOneCards.append(random.randint(2, 14))
- playerTwoCards.append(random.randint(2, 14))
- print(playerOneName + ' has the cards:')
- for card in playerOneCards:
- printCard(card)
- playerTwoName = input('Enter name for player two:')
- print(playerTwoName + ' has the cards:')
- for card2 in playerTwoCards:
- printCard(card2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement