Skip to main content

A commons library for Project Euler problems.

Project description

Leonhard

A commons library for Project Euler problems.

Requirements

  • Python 3.x

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/

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

leonhard-1.6.5.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

leonhard-1.6.5-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file leonhard-1.6.5.tar.gz.

File metadata

  • Download URL: leonhard-1.6.5.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for leonhard-1.6.5.tar.gz
Algorithm Hash digest
SHA256 3375af6bac215d6d823044864b6ceb48b391ceea8e251fdd54f1a8e765111a5a
MD5 039ef555581d83461b3767fedcb2427d
BLAKE2b-256 917eb219c238dcffbcebc39f7192aec34cda630298a705ee1498d72587a01750

See more details on using hashes here.

File details

Details for the file leonhard-1.6.5-py3-none-any.whl.

File metadata

  • Download URL: leonhard-1.6.5-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for leonhard-1.6.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8b49e9075255340eb1d74479140dfb19ede073308cb599a1b392ee89b3441a12
MD5 8c72236be3a0d00e8477e2c617f3719b
BLAKE2b-256 439cb0223bd78d5ca99f449a0af89b2d80d78befd8112e117cde8c4661b2ccdb

See more details on using hashes here.

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