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.4.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.4-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: armstrong_checker-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 5d4d4ee38ac7e9ec644ad624bf5233791383bc5fef8054a1136ab26c1e20eda4
MD5 89ff0d46b2546dafaf88cf77c42c5dea
BLAKE2b-256 7c5feefffc2da1b791c0f262d5672c7ffb307741bb626efc693c190ce782637b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for armstrong_checker-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 15f77d25638a4f03841934b18b2bdef49d4e5bfe8363dda8c698b255258bcdca
MD5 8ff607c7ebae8874ce13a8d154b6b4b8
BLAKE2b-256 fde0da87af5b6df4d7dd7faa8e9f682ef300109a27a44bb2115b1aa153d332d1

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