Skip to main content

Python converter of numbers in figures to words

Project description

Given any number up to a vigintillion, this class will return the same number in words

requirements

  • python3

running the tests

python tests.py

using custom tests

Import NumbersToWords;
NumbersToWords("45781", add_and=False).words # for when the conjuntion "and" is unnecessary
NumbersToWords("45781", add_and=True).words # for when the conjuntion "and" is necessary

# replace 45781 with custom numbers as desired within the bounds

Assumptions

The class only works with strings. We are not handling

  • negative integers
  • direct integers.

You have to pass the number intended as a string Of course a serializer can be used to validate this in production if it was user input.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

number_to_words-0.1.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file number_to_words-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: number_to_words-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.3

File hashes

Hashes for number_to_words-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6d089763a578afbb02519b5c4de6b8d31e295d22ca01d503283e7057113ec79d
MD5 63a6e21fe1369ffa3d82c193c9dd12e5
BLAKE2b-256 e514bcee45a7faea4c96eafb819769c563cb0e30fcc27008db5e7a7e2e1ed52b

See more details on using hashes here.

Supported by

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