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.
Retired as a duplicate.
In case anyone has the same problem, it seems that by design they call the function without any arguments, you have to somehow figure out how to deal with that. Sucks it isn't mentioned in the description.
How do I pass with PHP?
On receiving a string if I return
null
I get this message:Changing it to
false
and it throws this:ArgumentCountError : Too few arguments to function f(), 0 passed
in /workspace/default/tests/FTest.php on line 9 and exactly 1 expected
This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/188.
Please join the discussion to help us identify duplicate kata and retire them.
ArgumentCountError : Too few arguments to function f(), 0 passed in /workspace/default/tests/FTest.php on line 9 and exactly 1 expected
There are no letters in the example! But when checking the kata, str is used.
This comment is hidden because it contains spoiler information about the solution
Fixed.
Fixed.
Those were warnings, and they shouldn't prevent your code to pass the kata, fixed them anyways.
Fixed (the warnings).
Tests with odd numbers are correct, and your initial formula does not handle them correctly.
Random tests with an odd number are false. I had to write a wrong answer to validate the tests.
I have the same. I used an earlier version as advised below.
Mono 4.2.3
Throws a new error.
Exception System.NullReferenceException: The object reference is not set to an instance of the object
I would like to send the code in one line, but...
tests/Fixture.cs(14,42): warning CS0078: The 'l' suffix is easily confused with the digit '1' -- use 'L' for clarity
tests/Fixture.cs(14,57): warning CS0078: The 'l' suffix is easily confused with the digit '1' -- use 'L' for clarity
tests/Fixture.cs(15,42): warning CS0078: The 'l' suffix is easily confused with the digit '1' -- use 'L' for clarity
tests/Fixture.cs(15,58): warning CS0078: The 'l' suffix is easily confused with the digit '1' -- use 'L' for clarity
tests/Fixture.cs(16,44): warning CS0078: The 'l' suffix is easily confused with the digit '1' -- use 'L' for clarity
tests/Fixture.cs(16,65): warning CS0078: The 'l' suffix is easily confused with the digit '1' -- use 'L' for clarity
Loading more items...