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.
Trivial map/filter/reduce is not a novel kata idea.
Yeah, it was my function. My bad😅
Fixed the swap, what do you mean with negative values? That doesn't seem possible. Are you sure it wasn't your function the one that returned negative values because of the swap?
For JS, the actual and expected results are swapped around for the random tests. Sometimes tests expect negative value while other times they do not with the exact same values.
.
Added extra parameter:
def death_star(week, attack):
Tuples: no, that's personnal opinion, nothing more. At most a suggestion.
Extra parameter, yes, on the other hand.
The input should be a tuple of tuples in Python with attack day being a separate function parameter.
Approved
Python translation
If you don't get it on the first attemp all but one of the tests that I failed showed that the answer was expecting a negative value for the required materials if the death star was not completed. However, that is not actually what is required based on the solutions that were shown. It was, of course, frustrating that your tests have this glitch.
Cleaned up the description.
Fixed.
Fixed.
Loading more items...