Skip to content

Latest commit

 

History

History
49 lines (31 loc) · 905 Bytes

NumbersToWords.md

File metadata and controls

49 lines (31 loc) · 905 Bytes

Numbers to Words Kata

Background Info

Specification

Test Data

Use Case Scenarios

Getting setup

Have python & pipenv and install the deps:

pipenv install

Run the tests so you know your env works:

pipenv run pytest

The Kata

Create a program which given an integer produces the english words representing that number.

  • 1 -> One
  • 13 -> Thirteen
  • 105 -> One hundred and five.
  • 2103 -> Two thousand one hundred and three

Extension 1

With the above working extend the input so floats are covered using fractions

  • 1.5 -> One and a half
  • 12.75 -> Twelve and three quarters
  • 5.05 -> Five and five hundredths

Extension 2

Add additional functionality to produce a number from english words. The reverse of the above.

  • One -> 1
  • Thirteen -> 13

Credits

http://codingdojo.org/kata/NumbersInWords/