lundi 22 décembre 2014

Python Random Numbers ERror

I'm trying to make a random number generator. I'm fairly new to python.



#!/usr/bin/python
import random

print random.randint(1,6)


I keep getting this error



File "random.py", line 2, in <module>
import random
File "/home//Desktop/Python/random.py", line 4, in <module>
print random.randint(1,6)
AttributeError: 'module' object has no attribute 'randint'




Aucun commentaire:

Enregistrer un commentaire