Skip to content

Proposed solution for Google number to word interview Question

Notifications You must be signed in to change notification settings

Csalcedo04/NumbertoWord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Number to Words Converter

Python License

Description

This project is a proposed solution for a Google interview question involving converting numbers into words. The program takes an integer as input and returns its English word representation.

Example

  • Input: 438237764
  • Output: Four Hundred Thirty Eight Million Two Hundred Thirty Seven Thousand Seven Hundred Sixty Four

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/number-to-words.git
  2. Navigate to the project directory:

    cd number-to-words
  3. (Optional) Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`

Usage

To use the number-to-words converter, simply import and use the NumberToWords class in your code:

from number2string import NumberToWords

converter = NumberToWords()
result = converter.number2string(438237764)
print(result)  # Output: Four Hundred Thirty Eight Million Two Hundred Thirty Seven Thousand Seven Hundred Sixty Four

About

Proposed solution for Google number to word interview Question

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages