Skip to main content

Generate a list of prime numbers within a specified range

Project description

PySieveEra is a Python package that implements the Sieve of Eratosthenes algorithm to efficiently generate a list of prime numbers within a specified numerical range. This tool is useful for various mathematical and computational applications that involve prime numbers.

Installation

You can install PySieveEra using pip, the Python package manager. Open your terminal or command prompt and run the following command:

pip install PySieveEra

Usage

from PySieveEra import SieveEra

# Generate a list of prime numbers within a specified range
limit = 40
prime_numbers = SieveEra(limit)
print("Prime numbers within the range:", prime_numbers)

Options

limit (default is 20): The upper limit for generating prime numbers. Specify the maximum value up to which you want to find prime numbers

Output

The function returns a list of prime numbers within the specified range. You can then use this list for your specific needs. Prime numbers within the range: [2, 3, 5, 7, 11, 13, 17, 19]

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

PySieveEra-0.1.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

PySieveEra-0.1-py3-none-any.whl (2.8 kB view hashes)

Uploaded Python 3

Supported by

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