Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Clearly, there are some big issues with the kata.
Input: 60555138471.215004
Expected: 'sixty billion five hundred and fifty-five million one hundred and thirty-eight thousand four hundred and seventy-one point two one five zero ', instead got: 'sixty billion five hundred and fifty-five million one hundred and thirty-eight thousand four hundred and seventy-one point two one five'
Why is there an extra space in the end of expected result.
Input: 7868187285.488895
Expected: 'seven billion eight hundred and sixty-eight million one hundred and eighty-seven thousand two hundred and eighty-five point four eight eight eight zeronine five', instead got: 'seven billion eight hundred and sixty-eight million one hundred and eighty-seven thousand two hundred and eighty-five point four eight eight nine'
What is
zeronine
???Input: 38455676677.275635
Expected: 'thirty-eight billion four hundred and fifty-five million six hundred and seventy-six thousand six hundred and seventy-seven point two seven five six four', instead got: 'thirty-eight billion four hundred and fifty-five million six hundred and seventy-six thousand six hundred and seventy-seven point two seven five six three'
There's no mention about how to handle the floating point digits. Whether to just cut it, round it, or do something else with it.
sometimes there is extra zero with space in the end ('00' should be or 'zero zero' or '', but not 'zero ')
-32744575524.326004 -> negative thirty-two billion seven hundred and forty-four million five hundred and seventy-five thousand five hundred and twenty-four point three two six zero - Expected: 'negative thirty-two billion seven hundred and forty-four million five hundred and seventy-five thousand five hundred and twenty-four point three two six zero ', instead got: 'negative thirty-two billion seven hundred and forty-four million five hundred and seventy-five thousand five hundred and twenty-four point three two six'
sometimes there is a zeronine (which is result of rounding up 9 as I sould see)
26956648968.618298 -> twenty-six billion nine hundred and fifty-six million six hundred and forty-eight thousand nine hundred and sixty-eight point six one eight two zeronine eight - Expected: 'twenty-six billion nine hundred and fifty-six million six hundred and forty-eight thousand nine hundred and sixty-eight point six one eight two zeronine eight', instead got: 'twenty-six billion nine hundred and fifty-six million six hundred and forty-eight thousand nine hundred and sixty-eight point six one eight three'
I'm not sure how I could reproduce such a logic. finally I wrote a workaroung for zeroes and spaces and pressed attempt until got random tests without 'zeronine' issue.
As a fix I'd suggest to throw away rounding and '5 decimal places' condition. Another way is to choose some rounding method and state that in description as there are more than one way to do that (for example in JS (0.651365 + Number.EPSILON).toFixed(5) > (0.651365).toFixed(5) )
This comment is hidden because it contains spoiler information about the solution
Random tests are incorrect for decimal numbers. Please expect 5 decimal places at most.
Hi,
fourteen
(the classic typo)cheers