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.
can't be modified
This is absolutely beautiful code! Wow, I would have never came up with a solution like this, bravo!
Returning a single character string just for the case when length is 1 is a horrible idea.
(I know of a kata author which does this lots of times, and that's just horrible.)
Though, of course, the most natural way is to return a string that has all the characters joined together. That eliminates all the possible ugliness that might happen because of these.
RTFM: "returns an array of the repeated characters"
I am 100% a newbie so it makes 100% sense. Haha sorry for inconvience.
That's a newbie mistake, so for all purposes it's out of the question. This isn't an
8kyu
, and we shouldn't be that hand-holding to people.This comment is hidden because it contains spoiler information about the solution
What's the problem here?
You're just throwing a failed test case out without mentioning what you did, or why is that something that needs to be addressed, or how is that so. That's... not helpful at all.
And the expect result is perfectly correct, so it makes like negative sense.
Hey just wanted to give some feedback for python. First off excellent kata to test dictionary skills. Secondly, when testing I got:
'p' should equal ['p']
Personally, I would address this and change it, but up to you.
Glad to hear that! And thanks for explaining the norms to me, that's super helpful :)
Oh, and yes, you have fixed the issue :) Thanks!
@marbiru FYI, the problem there isn't that the expected result has a trailing
.0
. It's that the second element in the attempted solution is off by 4. I don't think this is something that needs troubleshooting, but it's hard to say without seeing @camoneill25's code.It is a little tricky, for that very reason (how can you carefully review solutions in languages you don't know) :) Generally, if you have a good, comprehensive basic test suite, you can confirm that the behavior matches the behavior in the original language, but the most thorough way to do it is to look at the translation and then ask the translator to explain anything in the code and the tests that you don't understand. Don't be afraid to ask for line by line comments. You can also go to the glitter channel and ask if someone could review the translation.
Really sorry -- I also tried figuring out how to int() both solutions so that they would equalise even with different rounding methods but couldn't get it to work –– if any pythonistas could lend a hand that would be awesome, I'm not sure how to troubleshoot this
ok, apparently Python doesn't have a Deep Equals, I was assuming there was an analogy to javascript that doesn't actually exist. Can anyone with Python experience help me troubleshoot this? Maybe the problem is actually with round and forcing the answer to be an integer and not a float, I don't know.
Loading more items...