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
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"
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.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.
@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.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.
Thanks so much, that's really helpful. I don't know much python but I guess we need some kind of Deep Equals here, let me look at the docs and see if I can find it.
I just corrected the kata a few minutes ago so migth have still been in process when you solved it! Really glad to hear it's working now though, and thanks for letting me know