MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / random

Method random

tools/python-3.11.9-amd64/Lib/random.py:796–798  ·  view source on GitHub ↗

Get the next random number in the range 0.0 <= X < 1.0.

(self)

Source from the content-addressed store, hash-verified

794 """
795
796 def random(self):
797 """Get the next random number in the range 0.0 <= X < 1.0."""
798 return (int.from_bytes(_urandom(7)) >> 3) * RECIP_BPF
799
800 def getrandbits(self, k):
801 """getrandbits(k) -> x. Generates an int with k random bits."""

Callers 11

uniformMethod · 0.80
triangularMethod · 0.80
expovariateMethod · 0.80
paretovariateMethod · 0.80
weibullvariateMethod · 0.80
live.pyFile · 0.80
__call__Method · 0.80
_random_dataFunction · 0.80
make_randomMethod · 0.80

Calls 1

from_bytesMethod · 0.80

Tested by

no test coverage detected