My code looks like this:
import random
x = random()
print (x)
and I get following error:
Traceback (most recent call last):
File "random.py", line 1, in <module>
import random
File "C:\Users\joshu\Desktop\random.py", line 2, in <module>
x = random()
TypeError: 'module' object is not callable
What did I do wrong? From my understanding, random should be installed with python, shouldn't it?
Aucun commentaire:
Enregistrer un commentaire