How to make random numbers in python without the random module
I want to be able to generate my own random numbers without using the random module. I want to do this that way I can learn somewhat how to do the big boy code on my own.
3
Contributors
2
Replies
16 Hours
Discussion Span
1 Year Ago
Last Updated
4
Views
Question Answered
Related Article:Python error in importing Module
is a Python discussion thread by Ice_Occultism that has 2 replies and was last updated 1 year ago.
Pseudo-random number generators are a very complex subject, so it's better off to use the implementations produced by the people that have a good understanding of the subject.
Python uses the Mersenne twister as the core generator. It produces 53-bit precision floats and has a period of 2**19937-1.
The underlying implementation in C is both fast and threadsafe.