Skip to main content

A primer for prime numbers

Project description

To use as a package:

>>> import primer
>>> primer.primes(10)
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
>>> primer.prime(10)
29
>>> pg = primer.pgf()
>>> pg.next()
2
>>> pg.next()
3
>>> pg.next()
5
>>>

To use as a script:

$ 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)

Version 1.0.2 2015-03-25

  • Fix keywords.

Version 1.0.1 2015-03-25

  • Release testing.

Version 1.0 2015-03-23

  • Initial release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

primer-1.0.2.zip (13.6 kB view details)

Uploaded Source

File details

Details for the file primer-1.0.2.zip.

File metadata

  • Download URL: primer-1.0.2.zip
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for primer-1.0.2.zip
Algorithm Hash digest
SHA256 7c30fc4812dbc7926c9dade666d73652405aabfbe3e660befb73d5bc1cccf751
MD5 52c612936cccf5262311f7db739d4c1b
BLAKE2b-256 d6ddc2e555111211ea665a00acac2327a3a1c34196843a9917a9895251da07cd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page