Answer the question
In order to leave comments, you need to log in
How to make a random number not random?
It is necessary that, upon request, it gives out a random number, but 20% by 80%.
For example, from a segment from 0 to 10, out of 100 calls, 20% will fall out 0-3, and 80% will fall out 4-10.
I'm not asking for a ready-made function, but maybe someone knows an algorithm for such a random number? Or an example in any language, I myself will rewrite it in python.
Answer the question
In order to leave comments, you need to log in
The first call to rand shows what "percentage" the next number falls into, and then rand twitches a second time with the necessary boundaries to get the number itself, and the boundaries depend on the first one.
Regarding randomness-non-randomness, rand in your case probably does not produce a random (!!!) sequence.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question