Shuffling the deck

In a real card game, we shuffle the deck, which means we mix up the cards so they're in a random order. That way we can just take the top card, and it'll be random. But with the random.choice () function, we're going to pick randomly from the list anyway. We don't have to take the "top" card, so there's no point in "shuffling" the deck. We' just randomly pick a card from anywhere in the deck. This is like fanning out the cards and saying "Pick a card, any card!" That would be rather time-consuming to do for each person's turn in a card game, but it's very easy in a computer program.

100 Bowling Tips

100 Bowling Tips

Playing bowling with your friends can help you decide if it is indeed the hobby that you want to invest your time on today. Aside from that, it can help you get a better feel of the sport. More importantly, when you play with your friends, it would become a more fun activity, which you can look forward to each week.

Get My Free Ebook


Post a comment