micropython-lib/python-stdlib/random/test_randrange.py

15 wiersze
230 B
Python
Czysty Zwykły widok Historia

2017-11-25 10:31:35 +00:00
from random import *
UPPER = 100
s = set()
# This number of course depends on a particular PRNG and its default seed
# as used by MicroPython.
for c in range(496):
r = randrange(UPPER)
s.add(r)
assert len(s) == UPPER