素数入门
primer的Python项目详细描述
用于教学目的的暴力功能。没有表演。
作为包使用:
>>> import primer >>> primer.primes(10) [2, 3, 5, 7, 11, 13, 17, 19, 23, 29] >>> primer.prime(10) 29 >>> primer.primorial(10) 6469693230 >>> primer.sieve(40) [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37] >>>
用作脚本:
$ python -m primer [-h] [-t] [N]
Display the first N primes.
- positional arguments:
- N Number of primes to generate (default: 100)
- optional arguments:
-h, --help show this help message and exit -t Display elapsed time (default: False)
版本1.4.4 2015-04-09
- 考虑发电机功能。(CBC)
版本1.4.3 2015-04-02
- 将函数重构为模块。(CBC)
- 重构测试中的主命名空间。(CBC)
- 添加了version.txt。(CBC)
- 已将下载URL添加到安装程序。(CBC)
版本1.4.2 2015-04-01
- 使已安装的测试可作为脚本运行。(CBC)
版本1.4.1 2015-04-01
- 使reduce可读。哈夫德。(CBC)
版本1.4 2015-03-26
- python 2/3的单一版本。(CBC)
版本1.3 2015-03-25
- 添加筛子功能。(CBC)
- 重命名测试方法。(CBC)
版本1.2.1 2015-03-25
- 更新自述文件。(CBC)
版本1.2 2015-03-25
- 将主生成器函数标记为private。(CBC)
- 更新docstrings。(CBC)
- 修复测试模块名称。(CBC)
- 重命名测试数据。(CBC)
版本1.1.1 2015-03-25
- 更新自述文件。(CBC)
版本1.1 2015-03-25
- 添加基本功能。(CBC)
版本1.0.2 2015-03-25
- 固定关键字。(CBC)
版本1.0.1 2015-03-25
- 释放测试。(CBC)
版本1.0 2015-03-23
- 初次发布。(CBC)