Random number generators generate a new "random" value based on the previous number. The initial value for this initial seed.
Interacting with the same value (for example, 0 in your code example) basically tells the random number generator to start with the same number each time. Having the same random number generated each time means your code is getting restarted. Example: Simulation uses this to restart a simulation with changed parameters, but with the same βdata setβ.
Another example:
I want to send myself a motivational message every day. Sometimes messages are distorted. The ability to restart the script by creating the same message again and again throughout the day makes this simple. In Perl code, this means:
If you want to create different numbers every time, you will need to set this seed to something random. The parameters are many, for example, time, PID, delay between two keystrokes by the user, some value received from the ethernet interface, etc., Or rather, the combination is higher, like time*PID .
We hope that this clarifies the idea of ββthe concept of the value of a random number.
Coroos
source share