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.
thank you for the reply, i've been programming for only three weeks now so still trying to get the hang of things.
Closing the question, please mark your posts as having spoiler content when they do.
This comment is hidden because it contains spoiler information about the solution
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.
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.
Python's % is modulo, javascript's % is remainder.
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.
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.
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?
This comment is hidden because it contains spoiler information about the solution