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.
xd
Should be:
Given these two matches results:
What's wrong there are the first match result and the total scored goals.
Hello, looks like a misprint in kata description:
["TEAM C", "6", "5"]
instead of
["TEAM C", "6", "4"], or
TEAM C won two matches (1x0 and 3x2). Receives 6 points and a total of 4 scored goals.
instead of
TEAM C won two matches (1x0 and 3x2). Receives 6 points and a total of 5 scored goals.
it would be definitely best and short solution with these last 3 lines:
return good > evil ? 'Battle Result: Good triumphs over Evil' :
evil > good ? 'Battle Result: Evil eradicates all trace of Good' :
'Battle Result: No victor on this battle field';
btw great job!
Scala translation
That's the point, if some side value is 0 (because of what I quoted before) or is negative it isn't a triangle and those tests expect
false
. Not a kata issue.Yes, some tests do not follow these rules. To pass the kata I had to change my solution, because tests form triangles with 0-sides and negative sides (what?)
Javascript language.
Both of those are in this line:
Do you mean there are some tests that expect another thing? In which language?
This comment is hidden because it contains spoiler information about the solution
Well, I got this one:
STDERR
Traceback (most recent call last):
File "tests.py", line 16, in
test.assert_equals(helper.page_index(0), 0, 'page_index returned incorrect value')
TypeError: 'int' object is not callable
In my IDE all works fine.