On Fri, 27 Sep 2013 17:40:46 -0400, Ned Batchelder wrote:
On 9/27/13 12:10 PM, Denis McMahon wrote:
On Fri, 27 Sep 2013 12:08:33 +, Dave Angel wrote:
i recall
writing a shuffle function in C decades ago, which took an array of
(52) unique items and put them in random order.
Whenever I
On 9/28/13 2:01 AM, Steven D'Aprano wrote:
On Fri, 27 Sep 2013 17:40:46 -0400, Ned Batchelder wrote:
On 9/27/13 12:10 PM, Denis McMahon wrote:
On Fri, 27 Sep 2013 12:08:33 +, Dave Angel wrote:
i recall
writing a shuffle function in C decades ago, which took an array of
(52) unique items
On 28/9/2013 06:31, Ned Batchelder wrote:
snip
I've thought that way about it too: there are so many shuffles any way,
it won't be a problem. But think about it like this: if you shuffle a
deck of 52 cards with a default Python random object, then once you have
dealt out only 28
Op 28-09-13 12:31, Ned Batchelder schreef:
On 9/28/13 2:01 AM, Steven D'Aprano wrote:
On Fri, 27 Sep 2013 17:40:46 -0400, Ned Batchelder wrote:
On 9/27/13 12:10 PM, Denis McMahon wrote:
On Fri, 27 Sep 2013 12:08:33 +, Dave Angel wrote:
i recall
writing a shuffle function in C decades
Antoon Pardon antoon.par...@rece.vub.ac.be wrote:
Op 28-09-13 12:31, Ned Batchelder schreef:
I've thought that way about it too: there are so many shuffles any way,
it won't be a problem. But think about it like this: if you shuffle a
deck of 52 cards with a default Python random object,
et väljuda): ))
if(n==0):
break
for i in range(n):
tõmba_kaart()
HI im trying to make a card dealer, but this code doesent work correctly. It
deasl cards, but the cards to repeat. when i type in 52 ten i might get 3 the
same cards. This is a translation from my c++ code
):
return randint(0, n)
while True:
n = int(input(Mitu kaarti tõmmata(0 et väljuda): ))
if(n==0):
break
for i in range(n):
tõmba_kaart()
HI im trying to make a card dealer, but this code doesent work correctly. It
deasl cards, but the cards to repeat
):
return randint(0, n)
while True:
n = int(input(Mitu kaarti tõmmata(0 et väljuda): ))
if(n==0):
break
for i in range(n):
tõmba_kaart()
HI im trying to make a card dealer, but this code doesent work correctly. It
deasl cards, but the cards to repeat. when i type
)
while True:
n = int(input(Mitu kaarti tõmmata(0 et väljuda): ))
if(n==0):
break
for i in range(n):
tõmba_kaart()
HI im trying to make a card dealer, but this code doesent work
correctly. It deasl cards, but the cards to repeat. when i type in 52
ten i might get
On 27/9/2013 07:26, Dave Angel wrote:
On 27/9/2013 06:24, markot...@gmail.com wrote:
I sent the previous message long before I had finished.
If you had created your global list containing list(range(52)), then you
could do nearly your entire program with one call to random.sample.
On Fri, 27 Sep 2013 12:08:33 +, Dave Angel wrote:
i recall
writing a shuffle function in C decades ago, which took an array of (52)
unique items and put them in random order.
Whenever I tried to write shuffles I came up against a fairly fundamental
limit:
52! prng states
Granted prngs
On 27/9/2013 12:10, Denis McMahon wrote:
On Fri, 27 Sep 2013 12:08:33 +, Dave Angel wrote:
i recall
writing a shuffle function in C decades ago, which took an array of (52)
unique items and put them in random order.
Whenever I tried to write shuffles I came up against a fairly
On 9/27/13 12:10 PM, Denis McMahon wrote:
On Fri, 27 Sep 2013 12:08:33 +, Dave Angel wrote:
i recall
writing a shuffle function in C decades ago, which took an array of (52)
unique items and put them in random order.
Whenever I tried to write shuffles I came up against a fairly
13 matches
Mail list logo