Ad
  • Custom User Avatar

    This Kata is very flawed: 1.) The description is wrong, since it messes up the correct terminology. What the kata wants is to have the VALUES of the hashes(Ruby)/ dictionaries(Python) summed up and not their KEYS. 2.) The sample tests (button "Test") are completely broken for Ruby, you can't use them and have to go directly to the full test suite (button "Attempt") which is detrimental to the user's statistics ("Kata solved on first attempt").

  • Custom User Avatar

    Description does not mention whether the array will only have two or more key-value pairs. If the final requirement is having two and only two key-value pairs, then the last two parameters are redundant, hence should be removed

  • Custom User Avatar
    • No sample tests

    • Ruby 3.0 should be enabled

  • Default User Avatar

    no random tests

  • Default User Avatar

    Translated to Javascript.

  • Default User Avatar

    Coming back again to "Remove odd hashes" task, it is not clear either what the additional parameters :a and :b are passed in for ? Should we check the sum of only :a keys, only :b keys, or :a and :b key in the provided hash?

  • Default User Avatar

    I think the task 'remove any hash whose two keys sum to an odd number.' should be rephrased to be clearer. For me, we can't sum the keys (:a, :b in this case) but sooner their values which are integers.

  • Custom User Avatar

    The test cases do not check for other keys than :a, :b so hardcoded solutoins unfortunatelly work.

  • Custom User Avatar

    This kata has very unclear description... For what sake do you need key_1 and key_2? oO

  • Custom User Avatar

    Sorry, can you clarify which point you are responding to? Where were the right arguments not used?

  • Custom User Avatar

    That's because you didn't use the right arguments, if you write a test, you should see related error messages.

  • Default User Avatar

    I'm the only person that hasen't used either the % or + operators so far...

  • Custom User Avatar

    Well actually is all up to the user to determine the array replaced or a new one, I'm just checking the output to be correct

  • Custom User Avatar

    you should add a test for index = -1
    default_value = 5
    data = [1, 2, 3]
    data[-2] == 2
    I have seen many solutions that will not return the correct value