Ad
  • Custom User Avatar
  • Custom User Avatar

    I just finished this, however, my first impression was that N was included as the integer component if the integer was 0 regardless of fraction part. So input of 0,0 --> N and input of 0,3 for instance -> N:.

    Having completed the kata and reread it seems like this isn't the case and 0,3 would just be :. and N is only when 0,0. However, due to the lack of test cases I am still unsure.

    It seems like this is worth clarifying in the description and/or in a test case. Thanks!

  • Custom User Avatar

    Suggestion: At the end of the description, after "with player 2 eventually winning", add something like "so the program should return 1, the player's index."

    I think this will prevent the confusion that many people have encountered, as indicated futher down in the discourse below. The description does state at the top that the index should be returned, but it's easy to forget this by the time you get to the bottom.

  • Custom User Avatar

    Description should be language agnostic (Function call in example should be replaced)

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

  • Loading more items...