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.
you are wrong, the Morse encoding of the comma is
--..--
, the dot is.-.-.-
, check here. The preloaded Map in Java encodes those correctlyDear Master! There is an error in the encoding of characters in your preloaded Morse code, namely, the period is encoded as a comma.
..... is a period
.-.-.- is a comma
Done.
@Bebek5121314: you need to add the same tests in the java version.
for Python, this tests added, about java i'm not ofc.
warning, this snipet is wrong as well. => copy to the user's, not anywhere else (unless the ref is mutating the input...? x/ )
edit: oh, that's what you say in the last sentence. But it's not what currently is in the test suite, so that tripped me up...
has this tests been added in all languages?
Random Tests in Python display users "final" array in error message leading to confusing error messages in cases where user modifies inputs:
test.assert_equals(is_defended(a, b), ref(a[:],b[:]), f"Didnt work for attackers={a}, defenders={b}")
(I can't edit tests myself - just make the
a
andb
copies before calling the users solution on them)Reraised as Issue above then
Thanks!!!
(that's actually an issue)
Thanks, I found the problem! =)
Check it now.
missing fixed tests: this solution should never pass the tests (the logic used is backward)
cheers
it looks like you just skimmed through the random tests by chance, but this has nothing to do with the
print
statement. It's only because you got lucky with the random tests during one attempt. Your solution actually fails most of the time, with or without the print statement.Loading more items...