Hello , Can someone explain me how does this code work ?
‘’’
import numpy as random
from numpy.random import rand
print(random.int16(rand()*1000))
‘’’
Hello , Can someone explain me how does this code work ?
‘’’
import numpy as random
from numpy.random import rand
print(random.int16(rand()*1000))
‘’’
Which part of it you didn’t understand?
I want to generate True random numbers but it generates pseudo random numbers.
how can I generate True random numbers ? The length of the random number must be16 bits
Maybe start at looking into the documentation of the random module which says something about whether the module itself is capable to do that (with some other places where to check further.)
Hope that helps anyhow.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.