Ask coding questions

← Back to all posts
How To Use var. with sleep module?
TheDestroyer99 (11)

Look Trough My Code.
At Line 27 (I believe) I Am Getting Error And Nothing I Have Done Has Fixed It

PLEASE HELP ME!!

Answered by notGilbert (45) [earned 5 cycles]
View Answer
Comments
hotnewtop
notGilbert (45)

you need to call the randint function (randint())

right now, you are calling sleep with a Function type, but sleep will only work with a integer.

s1 = rand.randint(1, 3) # (min, max)
s2 = rand.randint(0, 2) # (min, max)
# ...
TheDestroyer99 (11)

@notGilbert Thank You!
I Forgot That I Had To Define The Range For randint