In Python 2.7.1, I import the random module. when I call randint() however, I get the error:
ValueError: empty range for randrange() (1,1, 0)
This error is caused by an error in the random.py module itself. I don't know how to fix it, not does reinstalling python help. I can't change versions.
can someone please give me code for a working module or tell me what to do?
You called randint like this:
randint(1,0)
That tells randint to return a value starting as 1 and ending at 0. The range of numbers from 1 to zero is as you surely realize an empty range. Hence the error:
empty range for randrange()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With