dimanche 3 mai 2020

How to know if modules are imported correctly in Python

I'm having errors around 'random' commands.

I tried the simplest code and get an error.

Q. Is it possible that random module is not importing correctly?

How do I know if the error relates to importing or otherwise?

Do I need to save Python code in another directory (in the same as the modules are stored) I've looked at many similar questions but found no satisfaction.

I'm using 3.8.2

import random
for x in range(10):
    print (random.randint(1,101))

Error message




Aucun commentaire:

Enregistrer un commentaire