A simple version of the Sieve of Eratosthenes. Developed during "Python for Scientific Computing" course at CINECA
Project description
colanderpy
A simple version of the Sieve of Eratosthenes.
Developed during "Python for Scientific Computing" course at CINECA
Install from source
Clone repository
git clone https://gitlab.hpc.cineca.it/cineca-hpyc/colanderpy.git
and install
$ cd pycolander
$ python setup.py install
Install from Python Package Index (PyPI)
pip install pycolander
Usage
Prime number generator
$ sieve -n 42
2 3 5 7 11 13 17 19 23 29 31 37 41
$ sieve -h
usage: sieve [-h] [-n LIMIT]
The Sieve of Eratosthenes.
Returns the list of prime numbers up to a maximum integer.
optional arguments:
-h, --help show this help message and exit
-n LIMIT, --limit LIMIT
maximum integer up to which the prime numbers are searched. (default 100)
Prime-counting function
$ prime-counting -n 42
13
$ prime-counting -h
usage: prime-counting [-h] [-n LIMIT]
Prime-counting function
Counts the number of prime numbers less than or equal to an integer number.
optional arguments:
-h, --help show this help message and exit
-n LIMIT, --limit LIMIT
maximum integer up to which the prime numbers are counted. (default 100)
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
colanderpy-0.6.2.tar.gz
(2.6 kB
view details)
File details
Details for the file colanderpy-0.6.2.tar.gz.
File metadata
- Download URL: colanderpy-0.6.2.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dc8230145f578d633f7f8002c02484e6374ee3ae70439f380d0e77c2adf34ae
|
|
| MD5 |
233dbaf7b4e2ded98d390a1b6593e770
|
|
| BLAKE2b-256 |
b93494548618ac5f52a3233abee1d527247d08dafb402c1fac9b682730cd054f
|