summaryrefslogtreecommitdiff
path: root/tests/cpydiff/modules_random_getrandbits.py
blob: 523e3a329d4e4255f5fff188ab545525a6ba92ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
"""
categories: Modules,random
description: ``getrandbits`` method can only return a maximum of 32 bits at a time.
cause: PRNG's internal state is only 32bits so it can only return a maximum of 32 bits of data at a time.
workaround: If you need a number that has more than 32 bits then utilize the random module from micropython-lib.
"""

import random


x = random.getrandbits(64)
print("{}".format(x))