Ad
  • Custom User Avatar

    Two information which may help other codewarriors, which are missing (or I could not deduce it from the kata details) from the details of this kata (for those who, like me, did not know how the Enigma machine works):

    1- The "Dot" letter has an influence on the notch. As a matter of fact, the dot letter leads to an offset between the notch and the visible position in the window.
    Example:
    If notch is "Q" and dot letter is "A", then the notch causes rotation when "Q" is displayed in the window. No change, Dot is in initial position.

    If notch is "Q" and dot letter is "Z", then the notch causes rotation when "P" is displayed in the window, because Z has an offset of 25 towards A (0 position) => Q + offset of 25 gives "P".

    If notch is "Q" and dot letter is "M", then the notch causes rotation when "C" is displayed in the window, because M has an offset of 12 towards A (0 position) => Q + offset of 12 gives "C".

    2- When kata says "While in the actual usage of the original Enigma Machine, punctuation was encoded as words transmitted in the stream, in your code any input character that is not in the range A-Z should be returned unchanged and should not affect the internal state of the machine.", the "A-Z" is to be case-sensitive understood.

    That is "A-Z" will be ciphered and crypted, punctuation will leaves the machine status as is (no rotation, no ciphering) ... but range "a-z" will ALSO remains untouched.

  • Custom User Avatar

    missing useful imports.

    import codewars_test as test
    from solution import how_many_moves
    
  • Custom User Avatar

    Description should be language-agnostic

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

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

  • Custom User Avatar

    As stated at Wikipedia:

    For discrete distributions, there is no universal agreement on selecting the quartile values.

    So I think it should be mentioned in description that which method(1, 2, 3, or 4) should be used for calculating lower and upper quartile of a sequence with odd number of data.

  • Custom User Avatar

    python new test framework is required. updated in this fork

  • Custom User Avatar

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

  • Custom User Avatar

    In Java, it is rather hard to read values from Limit if the names of the exposed variables are never mentioned, and the definition of Limit is not available.

  • Custom User Avatar

    Also missing an edge case where required = 0 and hence should return 0.

  • Custom User Avatar

    The kata needs actual random tests: the only places where the test case are randomized all expects -1.

  • Custom User Avatar
    • Description should be language-agnostic

    • The range of n should be stated

  • Custom User Avatar

    If you want to actually test our knowledge of is_correlation_causal, you can't just put in a return value in initial code that can pass the tests: it doesn't teach anything if we don't even to touch it in the first place. At least it should be something like pass.

  • Custom User Avatar

    Even the linked Wikipedia article contains multiple definitions of correlation coefficient, so it's unclear which one is expected.

  • Loading more items...