Ad
  • Custom User Avatar

    Tests in python report that they are testing for a certain target_case, but are often actually testing for a completely different target_case. (The actual target_case passed to the user's function is different than the target_case reported in the it block message).

    Tests in python also run the user solution 3 times, followed by 3 tests, making logs look more confusing than they need to be if the user tries to log anything in their solution.

    running print(identifier, target_case) produces the following output (The lines under "Log" are what my code printed, the other lines are the it block messages:

    Log
    defghKLMNODEFGcdefg kebab
    bcdefghijklmn-ghijklm-efghijkl-hijkl camel
    fghijkl_fghijklmn_fghijklm_ghijklm camel
    
    
    identifier = 'defghKLMNODEFGcdefg'
    target_case = 'camel'
    
    
    identifier = 'bcdefghijklmn-ghijklm-efghijkl-hijkl'
    target_case = 'kebab'
    
    
    identifier = 'fghijkl_fghijklmn_fghijklm_ghijklm'
    target_case = 'snake'
    
  • Custom User Avatar

    I think I'm making a mistake with the random tests, because 550 warriors were able to solve the task in Python:

    This is the error message:

    identifier = 'jklmnJKLMJKLijklm'
    target_case = 'camel'
    Expected: jklmn_j_k_l_m_j_k_lijklm Instead got: jklmn_jKLMJKLijklm: 'jklmn_jKLMJKLijklm' should equal 'jklmn_j_l_m_j_k_lijklm'
    
    The expected result looks like snake case although it should be camel case. My result is neither ‘jklmn_j_k_l_m_j_k_lijklm’ nor ‘jklmn_j_k_l_m_j_k_lijklm’ but ‘jklmnJKLMJKLijklm’.
    
    

    Can someone please help me?

  • Custom User Avatar
  • Custom User Avatar

    It is necessary to add to the condition that the Euclidean distance must be rounded down before comparing with the radius, otherwise this was not initially described in any way.

  • Custom User Avatar

    Description is unclear and one cannot figure out what he is supposed to do from the very poor basic tests. Euclidean distance implies continuous (non integer) values, so we don't know how we're supposed to calculate the number of characters to fill. Please state clearly what we're supposed to do, or at least add more basic tests.

  • Custom User Avatar

    Add -Wincomplete-patterns, -Werror=incomplete-patterns GHC flags.
    It will make some unfair tricks unavailable.

  • Custom User Avatar

    Can anyone help me with generating testcases with random types? Template Haskell may make this possible, but I don't know Template Haskell.

    This seemed like a good place to find people who know it though. :P

    This question concerns a prospective Haskell translation of Join until impossible. I have posted this question there, as well as on several CodeWars Gitter fora. Feel free to react anywhere.

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    Is the trailing new line really necessary?