Ad
  • Custom User Avatar

    So happy I was able to get it"!!!

  • Default User Avatar

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

  • Default User Avatar
  • Custom User Avatar

    This is called slicing and it's very common in Python. Do you know you can copy code and test it onn your computer to see how it works? You can even do it here, just click fork under any solution (though the site is currently down so it is probable it doesn't work right now).

  • Default User Avatar

    The line "if l!=2:" is redundant, though I also suggest using elif and else for clarity

  • Custom User Avatar

    nice one with list comprehension. I made a similar one but mine was a bit more complicated.

  • Default User Avatar
  • Custom User Avatar

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

  • Custom User Avatar

    Usually a syntax error means you missed a parentheses or something on the previous line. Check the parens on the last line of your code.

  • Default User Avatar

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

  • Custom User Avatar

    Care to give something more specific about the broken test cases, including language, input and wrong output that passes it :)?

    And, as I mentioned, the goal in this kata is also to give some ambiguous direction to see how users manage to figure it out by themselves: I don't think I have done it elsewhere and I wanted to keep the interview feeling that I got getting this in an actual interview - that's all :)

  • Default User Avatar

    Hi,

    I enjoyed the Kata, but wanted to raise an issue. Since the tests are random, it is possible that an incorrect solution will be accepted and appear in the solved answers portion. I had an answer that came up with a failed test and resubmitted my answer to see if other tests would fail when it came up passing all tests. I then attempted to rerun it but all the tests passed and my answer was accepted. Rather than offering randomized tests, you should make sure your tests cover all acceptance criteria. The purpose of a kata isn't to trick the participant or show that you can be more clever. The instructions should be clear and the tests should be complete and consistent. To that end, as a native English speaker and a linguist, I agree that the use of "the quality of an item can never be negative or increase beyond 50" is ambiguous, as it doesn't address what should happen if the value is already above 50. The instructions do imply that the value cannot exceed 50 - particularly since this is supposed to be a replacement for the existing store management system, which should have also followed these rules. As it is written, it is hard to imagine anyone successfully completing this kata without receiving feedback from the test results. Thanks!

  • Default User Avatar

    That test I mentioned is from random tests, thanks for your time:) I was able to figure it out.

  • Custom User Avatar

    I am not sure where you get a third test that requires 3 as a solution, but it seems to me that you are not using the rules right for the Brie item.

    Also, when formatting code to reply here, be sure to put a triple backtick in the beginning and in the end :)

  • Default User Avatar

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

  • Loading more items...