Skip to main content

Checks if a number is prime

Project description

prime_test

This module provides the function test(n) that returns True if n is a prime number, and False if it is composite (note that this test is probabilistic so that it can test extremely large numbers very fast for RSA). The function also has an optional variable k (defaults to 40) which is the iterations of the test, more information on that can be found here. Below is an example of how to use the module.

from prime_test import prime
prime.test(167)

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

prime_test-0.2.7.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prime_test-0.2.7-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file prime_test-0.2.7.tar.gz.

File metadata

  • Download URL: prime_test-0.2.7.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for prime_test-0.2.7.tar.gz
Algorithm Hash digest
SHA256 67d28d554e62ee0b9109c5c2aa588ceeb78bc33d004e10a910a54301fe024895
MD5 ac2e69ca402ab4966170495aedb1c5ec
BLAKE2b-256 c54521d31d0da4de0ae9031e7e0e3a4bf75f41fab4b4108008daf4b1d1c05292

See more details on using hashes here.

File details

Details for the file prime_test-0.2.7-py3-none-any.whl.

File metadata

  • Download URL: prime_test-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for prime_test-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 d1accc231f5653ca7c70bd77c0e7b7adc84856ac616003ae0572ef4df48857d4
MD5 34a4bc4fe0fb112a41e83245055fc958
BLAKE2b-256 b377ef8fc216f3ad41a384acec56d380b0b155b78b56d03caf0bc1934195e467

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