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!
yeah ..... Got it !!!
Instructions are super vague/odd but if you look for patterns in that I trust you'll find it and the first thing you spot is probably what it is.
You also have the example tests to look at, as well as the rest of the test suite.
[10, 6, 5, 3, 2, 1] ----> [4, 1, 2, 1, 1] (9)
can anyone explain how that array convert into second one pleasee ??
For EVERY initial array there are FOUR steps and ONE final array.
You have to figure out what is that final step ... by comparing with other examples.
arr = [4, 4, 4, 4, 4, 4, 4, 1]
test.assert_equals(track_sum(arr),[[29, 5, 3, 3], [3]])
As I understand the second itteration should be [4, 1] and sum 5 and the third [3] sum = 3
Why the answer is not [[29, 5, 3], [3]]? Where am I wrong?
if('n') is always true as well as other expressions of a kind
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.
This comment is hidden because it contains spoiler information about the solution
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.
Loading more items...