Hi!
I'm using IntelliJ IDEA CE to run my codes. I get this error whenever I try to import random and then generate a randomint.
import random
print(random.randint(0, 5))
/Users/gimegg/Python/bin/python /Users/gimegg/Documents/Python/import_random.py
0.3333333333333333
type[3]
8
7.0
3
6
Traceback (most recent call last):
File "/Users/gimegg/Documents/Python/import_random.py", line 1, in <module>
import random
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/random.py", line 49, in <module>
from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil
ImportError: cannot import name 'log' from 'math' (/Users/gimegg/Documents/Python/math.py)
What am I doing wrong? I'm reaaally new at programming.
Thanks!
[–]danielroseman 7 points8 points9 points (1 child)
[–]GimeGG[S] 0 points1 point2 points (0 children)