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.
totally overcoded this lol
testBasicMorseDecoding
Expected: is "SOS"
but: was "null"
Stack Trace
Completed in 11ms
testMoreComplexTests
Expected: is "E"
but: was "nullE"
it's so weird
This comment is hidden because it contains spoiler information about the solution
THIS. This should be Best Practice. Otherwise it's just clever.
Yes, I don't think this is best practice. Clever, yes, but doesn't account for what you said
.
Fixed.
Why do we use set instead of using a list as a storage? Is it to lessen repeating numbers?
Thank you!
This comment is hidden because it contains spoiler information about the solution
In Python there is not much of a difference.
However, for general understanding, in other programming languages quotes (') ar usually used for either
Character
or for non-intrepretable string (aka, string where you cannot introduce a variable).So, it is good to have those in mind.
I generally use (') for char and (") for strings.
PEP: https://peps.python.org/pep-0008/#string-quotes
tnx, but i run it, right now i have another problem with next part )))
Test Results:
DecodeMorse
Example from description
Basic bits decoding
Expected
: E
to equal
: I
Completed in 0.5543ms
Multiple bits per dot handling
Expected
: U
to equal
: I
Completed in 0.4476ms
Extra zeros handling
Long messages handling
Expected
: S54S4HSLH
to equal
: THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.
Completed in 0.4355ms
Well, you returned a string with some missing spaces ("THELAZYDOG", when expected ending is "THE LAZY DOG"). You should print the input to console and try to debug it. For more information, see https://docs.codewars.com/training/troubleshooting
Golang:
Expected
: SOS! THE QUICK BROWN FOX JUMPS OVER THELAZYDOG.
to equal
: SOS! THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.
I dont understood why?
same
this is much better than mine DX
Loading more items...