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.
Faced same issue. Population can't be fractional, it's always an Integer.
Thank you for pointing out the direction out of the fog.;=)
Use
echo( $code . "\n");
testBasicCases
Log
.-.... .. ....---...
Failed asserting that two strings are equal.
Expected: 'SOS'
Actual : ''
I'm logging $code. And that's all I'm logging. Can you show me what I'm not understanding? The morse code for SOS isn't even in the log at all. That last portion should be HOS, no?
There is no such test, you're printing the input of several tests together, the tests in PHP are fine. Not a kata issue:
Definitely issues with the tests in PHP. Given this code: ".-.... .. ....---..." it expects the result to be "SOS".
Correct me if I'm wrong, but isn't SOS "... --- ..."?
Why are there spaces in between each letter in the initial tests (with a triple space meaning an ACTUAL space) but it's incredibly inconsistent in the final tests?
Same here
100 passed 1 failed.
stripe() solved the problem.
Thanks ;)
You're passing a non existant key to the dictionary.
STDERR
Traceback (most recent call last):
File "tests.py", line 29, in
testAndPrint(decodeMorse(' . '), 'E')
File "/workspace/default/solution.py", line 8, in decode_morse
i[x] = MORSE_CODE[i[x]]
KeyError: ''
???
Time: 462ms Passed: 9Failed: 0Exit Code: 1
It means you returned 3 but you should have returned 4.
Probably means your function returned 3, but should have returned 4
3 should equal 4
???