examples/numbers/rand.py
from __future__ import print_function, division
import random

print(random.random())                  # real value between 0.0 <=   < 1.0
print( 1 + int( 6 * random.random() ))  # 1, 2, 3, 4, 5, 6

print(random.randrange(1, 7))           #  1, 2, 3, 4, 5, 6