mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
31 lines
637 B
Python
31 lines
637 B
Python
|
def __init__(self):
|
||
|
"""
|
||
|
Initialize the random number generator.
|
||
|
"""
|
||
|
|
||
|
def random() -> float:
|
||
|
"""
|
||
|
Return a random float in the range [0.0, 1.0).
|
||
|
"""
|
||
|
|
||
|
def randint(a: int, b: int) -> int:
|
||
|
"""
|
||
|
Return a random integer in the range [a, b], including both end points.
|
||
|
"""
|
||
|
|
||
|
def randrange(start: int, stop: int, step: int) -> int:
|
||
|
"""
|
||
|
Return a randomly-selected element from range(start, stop, step).
|
||
|
"""
|
||
|
|
||
|
def seed(a: int) -> None:
|
||
|
"""
|
||
|
Initialize the random number generator.
|
||
|
"""
|
||
|
|
||
|
def uniform(a: float, b: float) -> float:
|
||
|
"""
|
||
|
Return a random float in the range [a, b).
|
||
|
"""
|
||
|
|