Skip to content

Python "Import random" Error #12

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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