Skip to content

Python "Import random" Error #12

@panchiwalashivani

Description

@panchiwalashivani

I'm learning Python. And this time I have a small error which I think is with this build of Python itself. When using the following:

import random
number = random.randint(1,10000)
Python gives me this error:

File "C\Users\name\Documents\Python\random.py", line 5, in (module)
print random.random()

TypeError: 'module' object is not callable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions