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.
And that is why using var is generally considered as a bad practice...
It's difficult understanding some katas like this one, challenging.
Random tests should also generate invalid cases (at least 30-50% of the time) and not just rely on fixed and sample tests (presumably all languages)
Missing fixed, sample and random tests for cases below:
n = true / false
n is a floating-point number (
1.23
)python new test framework is required. updated in this fork
python new test framework is required. updated in this fork
This comment is hidden because it contains spoiler information about the solution
same solution
Oh I see now. I was confused because I thought you were checking for duplicates in the set, which wouldn't make sense. Thanks for your help!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
How to fix this. "There are not only hex-chars in argument." I use regexp for checking the arg and i can find the problem
for JavaScript doesn't work for any response of the function except for throwing errors for test case:
Test.expectError("Incorrect hex-string length", function(){getReversedColor("1234567")});
returning false, returning nothing, NaN, undefined, 0 etc. still causes test error.
Throwing errors is not considered a common practice in JavaScript, so I strongly suggest either change the ourcome expectation for invalid inputs, or mention this in the description clearly.
As for now description only includes Java and Haskell:
"If the entered string is incorrect: length is 7+, has non-hexadecimal characters or non-string type, then the Error(IllegalArgumentException - Java) should be raised/thrown or Nothing should be returned in Haskell."
This comment is hidden because it contains spoiler information about the solution
It's how percent decrease works. Increase in 0.82 times is equal to decrease in 0.18 times.
Loading more items...