mardi 28 février 2017

Random Modules and "randint()" function

I am a beginner Python user. I was wondering why I am unable to use two randint() functions. I've done a little research on the issue, and it seems as though "I can only have one random module active at any time". Is there any way to get around this so I can have two "random values"?

Also, this is my first question ever, so criticism towards the question, sample code and answer are all welcome.

import random

random = random.randint(1, 5)
random_2 = random.randint(7, 11)

print(random)
print(random_2)




Aucun commentaire:

Enregistrer un commentaire