Creating a more random int?

mensanator at aol.com mensanator at aol.com
Tue Jan 24 12:42:37 EST 2006


Steven Macintyre wrote:
> Hi all,
>
> I need to retrieve an integer from within a range ... this works ... below
> is my out puts ... it just does not seem so random ...

What's wrong with it?

>
> Is there perhaps a suggestion out there to create a more random int ...?

What do you think the output should be?

What's your criteria for "more random"?

>
> >>> random.randint(3, 8)
> 7
> >>> random.randint(3, 8)
> 3
> >>> random.randint(3, 8)
> 3
> >>> random.randint(3, 8)
> 4
> >>> random.randint(3, 8)
> 3
> >>> random.randint(3, 8)
> 4
> >>> random.randint(3, 8)
> 7
> >>> random.randint(3, 8)
> 7
> >>> random.randint(3, 8)
> 7
> >>> random.randint(3, 8)
> 5
> >>> random.randint(3, 8)
> 6
> >>> random.randint(3, 8)
> 3
> >>> random.randint(3, 8)
> 8
> >>> random.randint(3, 8)
> 8
> >>> random.randint(3, 8)
> 5
> >>> random.randint(3, 8)
> 3
> >>> random.randint(3, 8)
> 4
> 
> Regards,
> 
> 
> Steven




More information about the Python-list mailing list