Initial revision

This commit is contained in:
Guido van Rossum 1990-10-13 19:23:40 +00:00
parent df79a1ee19
commit c636014c43
47 changed files with 5492 additions and 0 deletions

12
Lib/rand.py Normal file
View file

@ -0,0 +1,12 @@
# Module 'rand'
import whrandom
def srand(seed):
whrandom.seed(seed%256, seed/256%256, seed/65536%256)
def rand():
return int(whrandom.random() * 32768.0) % 32768
def choice(seq):
return seq[rand() % len(seq)]