Ad
  • Custom User Avatar

    Nice and funny kata, well done.

  • Custom User Avatar
    • Tests should not use test.expect in all languages

    • Python 3.8 should be enabled with new test framework (Refer this & this for more detail)

    • Ruby 3.0 should be enabled (Refer this & this for more detail)

  • Default User Avatar

    The constraints should be mentioned in the description. Also, please add large tests that reach septillion as of now there is only two fixed tests in that case (in this case, Python)

  • Custom User Avatar

    Test cases are far from enough. There are only 7 tests, and lots of buggy solution passed.

    Also, needs random tests.

  • Default User Avatar
  • Default User Avatar

    Resolved by switching to Python 2.

  • Default User Avatar

    Python test code is failing on "Testing for 120" with the following trace:

    Traceback:
       in 
       in sol_checker
       in simple_sol
       in simple_sol
    TypeError: list indices must be integers, not float
    

    My actual solution returns the expected string when tested locally with input 120; there are no floats involved.

    Double-checked the problem by submitting this:

    def int_to_english(n):
        if n == 1:
            return "one"
        elif n == 19:
            return "nineteen"
        elif n == 120:
            return "one hundred twenty"
    

    The failure is the same.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    Hi guys, I was intrigued by the top solution and then I decided to run it against my tests and some tests failed.

    I think this kata should contain more tests (sorry, I never suggested something to a kata, I don't know how to do this)

    But here are some that failed (I can probably send my whole suite if you are interested)

    Test.assert_equals(int_to_english(1000), 'one thousand')

    Test.assert_equals(int_to_english(100), 'one hundred')

    Test.assert_equals(int_to_english(30), 'thirty')

    Test.assert_equals(int_to_english(20), 'twenty')

    Test.assert_equals(int_to_english(14), 'fourteen')

  • Custom User Avatar

    Hey there,
    I worked on this for a really long time and it was good fun but now I'm failing on just a few of the random tests. I'm passing around 45/50. And I have no idea what the problem is, as my answer is exactly the same as the expected outcome.

    Error message is like this:

    Valid outputs: 'ten billion five hundred fifteen million eight hundred fifty thousand three hundred eighty seven' or 'ten billion five hundred and fifteen million eight hundred and fifty thousand three hundred and eighty-seven' - Expected: ten billion five hundred and fifteen million eight hundred and fifty thousand three hundred and eighty-seven, instead got: ten billion five hundred fifteen million eight hundred fifty thousand three hundred eighty seven

    Could anyone help out?

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    What about adding the case for 0 => 'zero'?

  • Default User Avatar

    I passed the submission but i still get a fail? passed all tests non failed, i got it done in 65ms? am i doing something wrong?

  • Custom User Avatar

    Well, I just learned that the framework merges double spaces into a single one upon print. This made it really hard to find the bug in my solution...

  • Custom User Avatar

    Hi There, my solution in Ruby passes all test but the last one, I wonder if you could help me figure out what is wrong. Any chance you could send me the test?

    Thanks

  • Loading more items...