I know how to generate a random number but it's not doing what I want.
I want it to generate a whole number between 1 and 4.
But when I write in (random(4)) the number 0 comes up too, and I don't want that.
Develop games in your browser. Powerful, performant & highly capable.
do random(4)+1
random(4) is a number between 0 and 3
it doesn't make sense exactly, but now you know
and any other case to generate a number between something just add a number to it
a number between 10 and 20 would be random(11)+10
Thanks, it works nicely.
You could also just script it with python.
import random
random.seed()
print random.randint(1,10)