Skip to main content

A simple package to check if a number is prime

Project description

is_prime

A simple Python package to check if a number is prime.

Installation

pip install is_prime_check

Usage

from is_prime import is_prime, get_primes

# Check if a single number is prime
print(is_prime(17))  # True
print(is_prime(4))   # False

# Get primes in a range
print(get_primes(10, 20))  # [11, 13, 17, 19]

Features

  • Check primality of integers
  • Generate lists of prime numbers
  • Efficient algorithm with O(sqrt(n)) time complexity

License

MIT License

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

is_prime_check-1.0.1.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

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

is_prime_check-1.0.1-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file is_prime_check-1.0.1.tar.gz.

File metadata

  • Download URL: is_prime_check-1.0.1.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for is_prime_check-1.0.1.tar.gz
Algorithm Hash digest
SHA256 02e5f8e51df478029444ac4c79b718bf10f7e46979bd35a7e85f0b9533c99435
MD5 dcd964436979ed7c3b349a76d6f772e6
BLAKE2b-256 2688e38ec16af7cfed8700e2954b6130095a28ded6c3667ce83fe11538987602

See more details on using hashes here.

File details

Details for the file is_prime_check-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: is_prime_check-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for is_prime_check-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 21112a03c3d2c3727e5ade583254e0957775cbfe317317e75689276e445377cf
MD5 00da091f60eb357f91403cfe5432ab07
BLAKE2b-256 2abac8f11a2169b9561412333e9b7a65aea6929f9ef4a919c45ac482470737af

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