So I'm trying to make a python code that generates random numbers using the park-miller algorithm. I know that the general idea should be:
seed = (16807*seed) % (2147483947)
but I am not sure how I would actually implement this into python. How would I specify returning a number from say 0-9?
Aucun commentaire:
Enregistrer un commentaire