Python: Random Number

From SpeedyWiki

Jump to: navigation, search
from random import randrange, uniform

# randrange gives you an integral value
irand = randrange(0, 10)

# uniform gives you a floating-point value
frand = uniform(0, 10)


[edit] Referensi

Personal tools