Skip to content
Sign upLog in
← Back to Community

How do i import random for python??

Profile icon
Dancingdev

I am trying to make a rock paper scissors console game and right now you just always lose soooo i need some ideas to import the random module so i can use that to create a randomint(1, 3) 1 being rock, 2 being paper ect. and in order to make it random i need the random module plz hel

Answered by ash15khng [earned 5 cycles]
View Answer
Voters
Profile icon
IsaacMiller7
Profile icon
Dancingdev
Comments
hotnewtop
Profile icon
ash15khng

Just add import random to the top. Then you can use stuff like random.randint(1,3) and stuff like that.