December 6th, 2013, 03:42 PM
Programming help needed!
I am trying to fix my generateDeck(), which assigns cards in reverse order and I think I accomplished that. However, I am trying to shuffle the cards 100 times and I am getting trouble modifying this part. May I have some assistance please, thanks!
cards = [10,9,8,7,6,5,4,3,2]
cards = cards*4
December 6th, 2013, 07:12 PM
You don't have any suits, and since you are using a random generator shuffling 100 times is no better than shuffling once.
cards = [10,9,8,7,6,5,4,3,2, 'A', 'K', 'Q', 'J'] ## you mix ints and strings
deck = 
for suit in ("C", "D", "H", "S"):
for card in cards:
print "Original deck", deck, "\n"
for ctr in range(100):
print "Shuffled deck", deck
December 6th, 2013, 08:52 PM
The suits does not matter in this case.
Originally Posted by dwblas