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.
Your implementation of the random tests makes it possible for the function to be passed no arguments, which contradicts the description.
The function is annotated with
tuple[int, int, int, int]
, but you expect alist[int]
in the tests. Please change the tests to expect atuple
.These tests do not compile. Try to figure out why.
the code has the words
for
,break
andcontinue
in the commentThis comment has been deleted.
Python translation
Python translation
fixed
Hi again,
The actual input(s?) are never discussed in the description. The user shouldn't have to guess the spec or enter the trainer to know about this.
Yes, I got that part. The problem was that with a not large enough tolerance, accidental "not optimal cases" could sometimes weight too much. But now it looks ok, so "anyway".
The reason I do tests like this is such that if your solution does worse on some tests, but does better on others, it can cancel out.
I thought multiprocessing didn't work here lol, guess I was wrong
Well, I didn't realize I was working on an updated version of the tests. My solution consistently passes, now, so in the end, I guess the tolerance is actually lax enough.
ok, look here, please: https://www.codewars.com/kumite/67928fddb47458a990ee6388?sel=67991f05b3e3da841ece0758
score += expected_cost / actual_cost
, which seems wrong to me, because an accidental huge diff will weight more on the final value while, in the end, what you actually want to test is that both solutions are randomly behaving "the same" (aka, sometimes exp is bigger, sometimes it's smaller).score += exp_cost /actual_cost
, the value increases when exp is worse than actual.Funny thing is that the test isNope, that part is ok, I'm just too much tired.(t-score) <= 0.925 * t
which means the actual solution has to be better than the expected one to pass the test. No?In the end:
totally wrongnot lax enough, as far as I can tell. A better measurment would be imo to do the following:Loading more items...