Skip to main content

pyUnit-Prime

质数处理和寻找质数的模块

安装

pip install pyunit-prime

命令行运行:打开控制台

prime -h # 获取帮助

命令行:
    判断是否是质数: prime -P 13
    寻找一个超大质数: prime -L 100
    返回区间内的质数: prime -R 100,500

判断是否是质数

from pyunit_prime import is_prime

if __name__ == '__main__':
    for i in range(10_0000):
        if is_prime(i):
            print(i)

寻找一个超大质数

from pyunit_prime import get_large_prime

if __name__ == '__main__':
    print(get_large_prime(150)) # 返回长度位150位的质数

返回区间内的质数

from pyunit_prime import prime_range

if __name__ == '__main__':
    print(prime_range(100, 10000))  # 返回100到10000区间的质数

Metadata

Release files for pyunit-prime 2020.3.22

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyunit-prime 2020.3.22
File Size Uploaded Provenance Actions
pyunit_prime-2020.3.22.tar.gz 38.6 kB Without provenance Details for pyunit_prime-2020.3.22.tar.gz

Release files / pyunit_prime-2020.3.22.tar.gz

Download URL pyunit_prime-2020.3.22.tar.gz
Size 38.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3a7138954b6cb46913eebdcf753da8d67bdfdb72089023509ccf0bbb74e8b538
BLAKE2b-256 checksum
How to use checksums
7abbd4644a71a69544d68d0a89da327fd05b6d9b1dff5593afaa4c4d59d623d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.5

Security for pyunit-prime 2020.3.22

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2020.3.22 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page