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.
I like this solution. The only thing is morse code is supposed to be fault tolerant. And given this code and timeUnit=1, '11' will be considered as '..' rather than '.'.
Anyway this seems out of scope of this kata. And tests go green :)
No. The output should be screen size, not the ratio. A 32x8 screen is not equivilent to a 4x1 screen.
TypeError: find_screen_height() takes 1 positional argument but 2 were give
I pass ONE arg: [1024, "4:3"] i.e.= ONE list with 2 elements
Comment?
217 , ratio solution is 32:8
Should it be reduced to 4:1?
Approved
python new test framework is required. updated in this fork
A statement from your code is not a question, closing
who else enjoys reducing python lambdas to unreadable one-liners
fixed
Great kata! it made me thinking!
Useful to know. Thanks for clarifying the meaning of this RegEx.
great kata
In the example provided, the results differ starting from the word
them
.them
is a longer word thanthe
, sothem
is expected to be selected as the longest valid word starting from thet
.You may want the algorithm to be able to distinguish that
["the", "middle]"
make more sense than["them", "id", "d", "l", "e"]
, but that is what the algorithm does. The kata is about coding that algorithm, not about segmenting the words as a human would expect.So I've completed the kata following the description literally. This kata still doesn't feel right to me.
Looks like there is an error in test cases for Kotlin - the wrong answer is expected.
input was "apurplepigandagreendonkeyflewakiteinthemiddleofthenightandendedupsunburnt"
expected:<[a, purple, pig, and, a, green, donkey, flew, a, kite, in, them, id, d, l, e, of, the, night, and, ended, up, sunburnt]>
but was:<[a, purple, pig, and, a, green, donkey, flew, a, kite, in, the, middle, of, the, night, and, ended, up, sunburnt]>
Loading more items...