Ad
  • Custom User Avatar

    can't be modified

  • Custom User Avatar

    This is absolutely beautiful code! Wow, I would have never came up with a solution like this, bravo!

  • Custom User Avatar

    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.

  • Custom User Avatar

    RTFM: "returns an array of the repeated characters"

  • Custom User Avatar

    I am 100% a newbie so it makes 100% sense. Haha sorry for inconvience.

  • Custom User Avatar

    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.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    Glad to hear that! And thanks for explaining the norms to me, that's super helpful :)

  • Custom User Avatar

    Oh, and yes, you have fixed the issue :) Thanks!

  • Custom User Avatar

    @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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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

  • Custom User Avatar

    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...