Skip to main content

A Python module to convert numerical values into their word representation.

Project description

wordify

Wordify is a Python class that converts a given number into its word representation. It can convert numbers up to centillions.

Usage

  1. Import the Converter class

    from wordify.converter import Converter
    
  2. Create an instance of the Converter class by providing a number to be converted.

    number = "12345"
    converter = Converter(number)
    
  3. Convert the number to its word representation using the convert method.

    word_representation = converter.convert()
    
  4. Print the word representation.

    print(word_representation)
    

Example

from converter import Converter

# Create a Converter instance with a number
number = "12345"
converter = Converter(number)

# Convert the number to words
word_representation = converter.convert()

# Print the word representation
print(word_representation) # Output : twelve thousand and three hundred forty five

Customization

You can set a new number for conversion using the set_number method.

converter.set_number("987654321")

After setting the new number, you need to call the convert method again to obtain the word representation.

License

The code in this repository is licensed under the MIT License.

You can find the full text of the license in the LICENSE file. For more information, please visit the repository on GitHub.

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

wordify-1.2.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

wordify-1.2.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file wordify-1.2.0.tar.gz.

File metadata

  • Download URL: wordify-1.2.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for wordify-1.2.0.tar.gz
Algorithm Hash digest
SHA256 658da0edfd9a95551b3f580970d2b3b5530e57ba2b3b9295d3c8d75c0fac2a30
MD5 88436c3febf07b687504592d26e8a690
BLAKE2b-256 6672e1b619f111696d54a39bfbc228988c101d5308b0b91c017e69daeeaeeaec

See more details on using hashes here.

File details

Details for the file wordify-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: wordify-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for wordify-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d82a919d14720ec22fd526e43ed67bf217365f8c5f8c8ff5320a9aeab55e7ba7
MD5 dce08d82f74cec4cc8e63ac52ab99f67
BLAKE2b-256 c479ad5c1861e0a960a99f7ead169e69f57f4235bb3b3da20bdd1678763c13b8

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