Skip to content

manixko/number2word

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”’ Number to Words Converter

This is a simple Python program that converts numbers into their English word representation.
For example:

  • 42 β†’ forty two
  • 317 β†’ three hundred and seventeen

πŸš€ Features

  • Converts numbers from 0 to 999 into words.
  • Handles user input interactively.
  • Displays helpful error messages for invalid inputs.
  • Option to exit the program by typing exit.

πŸ“‚ Project Structure

project/
|── src/
    │── constants.py # Stores word mappings for numbers
    │── number2word.py # Main program (converter logic and CLI)

▢️ How to Run

  1. Clone this repository or download the files.
  2. Make sure you have Python 3 installed.
  3. Run the program in your terminal:
    python src/number2word.py
  4. Enter a number and see the output in words.
  5. Type exit to quit.

⚠️ Limitations

  • Only supports numbers from 0 to 999.
  • Negative numbers are not supported.

About

A simple number to word project

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages