samedi 21 février 2015

generate random number through multiple iterations

I need to generate a random number over several iterations. Let me try and explain.



  1. Iteration generates a random number from range(1, 100)) (no problem)


IF I choose two iterations then:



  1. iteration generates a random number, where the value is limited to be +/- 20 of the result of 1. iteration. -still within 1-100.


And IF I choose three iteration then:



  1. iteration generates a random number, where the value is limited to be +/- 20 of the result of 2. iteration. -still within 1-100.


and so on.





Aucun commentaire:

Enregistrer un commentaire