Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

🔢 Number to Words Converter

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

  • 42forty two
  • 317three 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

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages