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.
Release files for number-to-words 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| number_to_words-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Release files / number_to_words-0.1.2-py3-none-any.whl
| Download URL | number_to_words-0.1.2-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d61b2564d47ac0d2dda8b0c9dbcb1a0f94146402de33803407a42c46e4e42bfc
|
|
BLAKE2b-256 checksum How to use checksums |
1a2c1dc26c273dfebab78a6e01b7272ad16afd75b55dfba0fbad291537087b2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|