Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Pseudo Random Number (uniform distribution)

  • random
import random

a = random.random()
print(a) # 0.5648261676148922  a value between 0.0 <=   < 1.0
print(random.random())
print(random.random())