+ 1
Module: random
I am getting the error: Value error: random.randint(1,1,0) As 1 - start 1- stop What is 0?? Why I am getting this error
4 Respostas
+ 2
As I understand, `randint` takes two parameters instead of three.
+ 2
Where did you see this code BTW? randint takes only 2 parameters, giving 3 will cause error.
* Reference:
https://www.w3schools.com/JUMP_LINK__&&__python__&&__JUMP_LINK/ref_random_randint.asp
(Edited)
+ 1
yeah thats what I do but I am getting an error with 3 parameters.
value error(1,1,0)
0
That may be randrange not randint. Then 3rd parameter is step count.
random.randrange(1,10,2)
Or
see from this link about use of arrays by importing numpy..
https://pynative.com/JUMP_LINK__&&__python__&&__JUMP_LINK-random-randrange/