Ad
  • Default User Avatar

    thank you for the reply, i've been programming for only three weeks now so still trying to get the hang of things.

  • Custom User Avatar

    Closing the question, please mark your posts as having spoiler content when they do.

  • Default User Avatar

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

  • Default User Avatar

    That's not valid python syntax, it did not work in vsc.
    If you're trying to unpack into a tuple, that would be:
    *listb, (parentheses aren't part of tuple syntax, but the comma is.)
    But your function isn't supposed to return a tuple anyhow, so that still would not work.

  • Custom User Avatar

    Indeed, it does not. Do you have idea why?

    Hint: try to recreate failing test case locally (see here how to get failing input) and debug through it in your IDE.

  • Default User Avatar

    Python's % is modulo, javascript's % is remainder.

  • Default User Avatar

    Hi Natan,
    I did it other way by figuring out what kind of number to go for, etc. instead of simple 3-liner as in Python. Even that failed to pass all the test suite. I noticed it fails when trying to cath negative odd, so putting Math.abs() everyhere worked out. I finaly did it, but to my big surprise the most promoted solution appears to be the same 3-liner as mine in Python.

  • Default User Avatar

    If you mean that your two solutions behave the same way then you could try the failing tests on both solutions and see if they really do respond the same.

  • Default User Avatar

    I've succeeded with this kata in Python and repeated just the same algorithm in JS. It passed simple tests, but failed all the suite. Is this kata about algorithm as labeled?

  • Default User Avatar

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