Skip to content

Latest commit

 

History

History

python

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Rule30

Installation

pip install rule30py

Usage

from rule30 import random, Rule30Random

print(random())

# to use the Psuedo-Random Number Generator
rng = Rule30Random()
print(rng.random())
print(rng.getrandbits(8))
# all the methods of random.Random are available, such as:
print(rng.randint(0, 100))
print(rng.uniform(0, 1))
print(rng.choice(range(10))
print(rng.sample(range(10), 3))