5 kyu

Adding words - Part II

75 of 255osofem

Description:

This is the second part of this kata series. First part is here and the third is here

Add two English words together!

Implement a class Arith such that

  var k = new Arith("three");
  k.add("one hundred and two"); //this should return "one hundred and five" 

Input - Will be between zero and five hundred and will always be in lower case. This input range applies to both the initial value upon object instantiation as well as the input for the add method.

Output - Word representation of the result of the addition. Should be in lower case

Word format - Both input and output shall be in the format 123 = one hundred and twenty three. No hyphen is needed in numbers 21-99. Words should also be separated with one space and no space padding is allowed.

Mathematics

Similar Kata:

Stats:

CreatedMay 31, 2017
PublishedMay 31, 2017
Warriors Trained1408
Total Skips470
Total Code Submissions3922
Total Times Completed255
JavaScript Completions75
Ruby Completions29
Python Completions124
PHP Completions44
Total Stars37
% of votes with a positive feedback rating93% of 75
Total "Very Satisfied" Votes65
Total "Somewhat Satisfied" Votes9
Total "Not Satisfied" Votes1
Total Rank Assessments10
Average Assessed Rank
5 kyu
Highest Assessed Rank
4 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • osofem Avatar
  • kazk Avatar
  • docgunthrop Avatar
  • adrian.eyre Avatar
Ad