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
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02e5f8e51df478029444ac4c79b718bf10f7e46979bd35a7e85f0b9533c99435
|
|
| MD5 |
dcd964436979ed7c3b349a76d6f772e6
|
|
| BLAKE2b-256 |
2688e38ec16af7cfed8700e2954b6130095a28ded6c3667ce83fe11538987602
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21112a03c3d2c3727e5ade583254e0957775cbfe317317e75689276e445377cf
|
|
| MD5 |
00da091f60eb357f91403cfe5432ab07
|
|
| BLAKE2b-256 |
2abac8f11a2169b9561412333e9b7a65aea6929f9ef4a919c45ac482470737af
|