Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- card = []
- hand = []
- deck = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] * 4
- random.shuffle(deck)
- draw = 1
- sumtest=0
- def testfunc(deck,hand,draw,card,sumtest):
- while draw == '1':
- card=deck.pop()
- sumtest=sumtest+card
- hand.append(card)
- print(f"{card} and {hand} sumtest {sumtest}")
- draw=input()
- return card, hand, sumtest
- draw = input()
- testfunc(deck,hand,draw,card,sumtest)
- print(f"{card} and {hand} and sumtest {sumtest}")
- print(f"{draw}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement