vendredi 4 janvier 2019

How to give a global a random number excluding 0

I am quite new to Netlogo and I am experiencing the following problem. I want to give a variable a random number between 1 and 10, so without 0. Using the following code: set random 10, netlogo will also pick 0 as a possibility. Is there any way to avoid this? Random-float works, but this does not select whole numbers. Thanks in advance for any help!

Max




Aucun commentaire:

Enregistrer un commentaire