selfteaching / selfteaching/selfteaching-python-camp

【自学内容】 导入模块中的一个函数和导入模块中的多个函数,处理方式不同

Open
#2,312 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
151
Forks
875
PR merge metrics
No merged PRs in 30d

Description

import random
print (random.uniform(0,12))
结果正常


import random
print (random.random())
print (random.uniform(0,12))
结果报错:TypeError: 'module' object is not callable 和module random has no uniform member
@realcaiying 最nice的教练

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce both Python snippets exactly as shown and compare the resulting errors with the reported behavior. The issue does not name a repository file or test, so first locate the self-learning material containing this example; done means the cause of the differing results is established and the instructional content or reproduction steps are corrected.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.