kopia lustrzana https://github.com/micropython/micropython-lib
random: Add test_randrange.py.
rodzic
ac6fcb4729
commit
7c6e26bfcd
|
@ -0,0 +1,14 @@
|
|||
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
|
Ładowanie…
Reference in New Issue