Skip to main content

Leonhard

A commons library for Project Euler problems.

Installation

pip install leonhard

Usage

>>> from leonhard import leonhard
>>> print(leonhard.get_factors_of_positive_integer(10))
[1, 2, 5, 10]

Functionalities

  • get_factors_of_positive_integer: Gets the factors of a given positive integer
  • generate_fibonacci_sequence: Generates a Fibonacci sequence
  • is_prime: Checks if a number is prime or not
  • is_pythagorean_triplet: Checks if a^2 + b^2 = c^2 where a < b < c
  • count_digits: Counts the number of digits of a given number
  • generate_collatz_sequence: Generates a collatz sequence
  • generate_cyclic_permutation: Generates the list of cyclic permutation of a given number
  • is_triangle_number(): Checks if a number is triangular or not

Samples

Sample files are found in samples/

Metadata

Release files for leonhard 1.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for leonhard 1.6.2
File Size Uploaded Provenance Actions
leonhard-1.6.2.tar.gz 7.3 kB Without provenance Details for leonhard-1.6.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for leonhard 1.6.2
File Interpreter ABI Platform Actions
leonhard-1.6.2-py3-none-any.whl Python 3 none any Details for leonhard-1.6.2-py3-none-any.whl

Total release size: 16.5 kB

Release files / leonhard-1.6.2.tar.gz

Download URL leonhard-1.6.2.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0ca9b57b38b0c9efd3e2eefc502815f6dbad9d6b3a79d48a43a38b2d454645c6
BLAKE2b-256 checksum
How to use checksums
7a08ceabad6b7630d38ad5ea3451ff21e8464fac18a0c5ea033be2d28adc7764
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

Release files / leonhard-1.6.2-py3-none-any.whl

Download URL leonhard-1.6.2-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cba1dc1c7c169954555e106a99be74eb35506c03e74258fde5a7fff40a4378be
BLAKE2b-256 checksum
How to use checksums
4b1c24ecfff29ba0af426f7f47ec1e7e0758217d184a3d83e81336aea95f622f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

Security for leonhard 1.6.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page