lundi 24 septembre 2018

Python - Using the random module to give you a value in the range of [0.0, 1.0), multiply it, and round it

Trying to figure out how to, using the random module, obtain five values in the range from [0.0, 1.0), multiplying each value spit out by 5000, and rounding it to zero decimal places all the while using the random() and range() functions.

I've experimented with this question for some time now and am running into the issue of my range values being floats. How would I go about resolving the float issue along with my multiplication/rounding/random and range function question?




Aucun commentaire:

Enregistrer un commentaire