mardi 24 mars 2020

Random Number Generator in Python

just started learning Python(2) and was wondering what the best way to make a Random Number Generator. I have made a very basic one so far with: "import random for x in range(1): print random.randint(0,5)" but was wondering if there was a better way to do this with the ability to have numbers that are not integers generated. The end goal for this code is to make a random period of time pass in a game using "time.sleep(x)", would love to know if there is a better way of doing this.




Aucun commentaire:

Enregistrer un commentaire