Ad
  • Default User Avatar

    Not necessary to convert to cArray to return str. The test can be done on str.length()

  • Default User Avatar

    Wow! this is really really clever.

  • Custom User Avatar

    The expected value has 9 digits and your function returned a number with only 8 digits. Paste your code and mark your post as having spoiler content. I've passed it in Java with no problems.

  • Default User Avatar

    Random test is failing for me in Java.

    randomTests(SolutionTest)

    expected:<-449970540> but was:<-73742809>

    I've tried running my code with those values in an array and I correctly return the expected value, so there must be a problem with the random test.

  • Default User Avatar

    @ THByt: warning, Anter69 is talking about using the edit panel of the kata directly, but I'm not sure you have enough honor to have access to this feature. If it's not the case, you'll have to fork your translation and submit a new one.

  • Custom User Avatar

    Yes, you can:

    • click on "edit kata" (top-right)
    • select python (if not yet selected)
    • make your changes (see more suggestions above)
    • click "re-publish" (top-left)
  • Custom User Avatar

    Further suggestions for python:

    • use snake_case for the function name, just make sure you keep compatibility with the older solutions, putting these lines at the top of the test block:
    try:
        time_convert = timeConvert
    except NameError:
        pass
    
    • consider using random.randint for generating random integers
    • also test negative numbers (e.g. randint(-100, 1000))
    • consider updating the solver in the tests (see the top rated solutions)

    Cheers

  • Custom User Avatar

    I'm not sure if I am allowed to edit the translation after it has been approved, but if I can, how?

  • Default User Avatar

    Hi THByt. Please review your translation and take care of the issue above.

    cheers,

    B4B

  • Default User Avatar

    see my issue just below (first point)

  • Default User Avatar

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