Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. import random
  2. card = []
  3. hand = []
  4. deck = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] * 4
  5. random.shuffle(deck)
  6. draw = 1
  7. sumtest=0
  8.  
  9. def testfunc(deck,hand,draw,card,sumtest):
  10. while draw == '1':
  11. card=deck.pop()
  12. sumtest=sumtest+card
  13. hand.append(card)
  14. print(f"{card} and {hand} sumtest {sumtest}")
  15. draw=input()
  16. return card, hand, sumtest
  17.  
  18.  
  19. draw = input()
  20.  
  21. testfunc(deck,hand,draw,card,sumtest)
  22. print(f"{card} and {hand} and sumtest {sumtest}")
  23. print(f"{draw}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement