Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nums to words #578

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

ReaganBlade
Copy link

Description

This Pull Request addresses issue #559 by adding a Python script for converting numbers to words. The script provides a function number_to_words that takes an integer as input and converts it into words. The conversion covers numbers up to 999999 as an example, and it handles numbers from 0 to 999999.

Changes Made

  • Added a new Python script (numToWord.py) containing the number to word converter function.
  • Implemented the number_to_words function to convert integers to words, handling numbers up to 999999.
  • Included a sample usage section to demonstrate how the function can be utilized.
  • Added error handling for invalid inputs.

How to Test

  1. Run the Python script numToWord.py.
  2. Enter different numbers as input to test the conversion to words.
  3. Verify that the script correctly converts numbers to words and handles edge cases and invalid inputs.

Related Issue

Fixes #559

Checklist

  • I have tested the code and verified that it works as expected.
  • I have added comments and explanations for the code for better understanding.
  • The code follows the project's coding style and conventions.
  • The code has been formatted and does not contain any linting issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Number to word converter code in python
1 participant