Skip to main content

Library to check if a number is Armstrong

Project description

armstrong-checker

A Python library to check if a number is an Armstrong number.

Usage

from armstrong_checker import armstrong

armstrong("153")

or

armstrong(153)

Explanations

  • The function armstrong() receives either a string or an integer containing a number.
  • This number must be an integer.
  • If any other parameter is passed, the function will return an error.
  • The return value of this function is a Boolean.

Tested Limit

The highest Armstrong number tested was:

115132219018763992565095597973971522401

So, I guarantee it will work with any number below that😃😜.

License

This project is licensed under the MIT License.

Instalation

pip install armstrong-checker

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

armstrong_checker-0.1.5.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

armstrong_checker-0.1.5-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file armstrong_checker-0.1.5.tar.gz.

File metadata

  • Download URL: armstrong_checker-0.1.5.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for armstrong_checker-0.1.5.tar.gz
Algorithm Hash digest
SHA256 8b28a982c30df002fcd263370dd0c125701da1a4cce1e334000e788619079cd1
MD5 42af16b021005df81e46567e4211c2ad
BLAKE2b-256 a22189bbe01a8fd51ad4e7404789564eb6d186f0d8accc29a7e19fcee00dbd89

See more details on using hashes here.

File details

Details for the file armstrong_checker-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for armstrong_checker-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a6bf5a83d4548a8e838755833e196d7da29052fd02c4f5e0778256e1133e3afa
MD5 1c138b060ba1d28ce34e2381b77956ce
BLAKE2b-256 3343c2f6b48a7696557201df5ed8e8b3cd4a17d669b9527f62b75515344ce8fc

See more details on using hashes here.

Supported by

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