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.
Fixed
Fixed
Using
test.expect
in real tests is unacceptable as it provides no feedback besides "nou".Testing for
len(string)
instead ofstring
itself is also a bad practice. For anything that doesn't have a length the test assertion code will throw an error instead.This edge case is not tested.
Needs random tests.
Sample tests and initial code uses completely different encoding (and I'm not sure what the real tests use). So which one is expected?
...Wut? AFAIK
L
andR
means left and right ifU
andD
means up and down. There isn't reason to flip the directions along only one axis besides to confuse people.There was a bug and its cause is unclear.
I fixed it by rewriting the tests.
Same issue found. I think you are right. Invalid test case it is.
I'm stuck exactly at this test case... any pointer would be appreciated. To be honest, I don't really understand how the alogrithm works when x is a float. To me it would make sense to round
x**n
but this is not what the author wants. Pretty lost here.stated it explicitly in description now
Hello, when trying to pass the Katakana tests, I have an error on the fourth or fith test.
However, the output of my code is
ドモアリガトゴザイマス
(which looks valid) and the expected string isドモアリガトゴザイマ���
which seems invalid to me. Am I missing something?Great kata, it took me a while to figure the best algorithm to do it. Thanks for this brain teaser :)
Couple of suggestions though: I think the sample tests are too easy to pass, so they don't give you enough feedback on the quality of your code. The sample tests should also take a longer time to compute using an optimize brute force algorithm, this way you can give a metric to people on how likely their function will pass the final test. Let me know if this makes any sense.
Great work, seriously!
I would definitively specify that the
sum
of the output should be the value.I really like it otherwise, short but pleasant.