Ad
  • Custom User Avatar

    If you are given too few arguments, or if they aren't numbers, then return 0. In C# you will be given only numbers.

    Then the parameter should be given as a list, also there is no specification in example and sample tests on how to handle this, so it is extra requirement confusion to the task...

  • Custom User Avatar

    This is an issue, since the requirements do not match with other language(s?) (JS only for now)

  • Custom User Avatar

    Description should be language-agnostic

  • Custom User Avatar
    • Node 18 should be enabled (Refer this and this for more info)
  • Custom User Avatar
  • Custom User Avatar

    I don't like how example tests (for C# at least) do not contain cases for missing parameters. "If you are given too few arguments [...]" can be interpreted in a few ways, and it's somewhat puzzling when you get compilation errors on final tests.

  • Default User Avatar

    Ruby translation. Please check and approve =)

  • Custom User Avatar

    Hi, I have a C# translation Kumited. However, I am a bit confused on how exactly you want the result to be rounded.

    Do you want the result to be rounded (e.g. 0.02123 -> 0.02, 0.100321 -> 0.1) or truncated (e.g. 0.108231 -> 0.10)?

  • Custom User Avatar

    The description should explicitly state that the price should be rounded, rather than truncated.

  • Custom User Avatar

    Fixed.

  • Custom User Avatar

    If you are given too few arguments, or if they aren't numbers, then return 0.

    In your random tests, the input you pass into the user function are all numerical strings and not actual numbers but they expect nonzero return values.

  • Custom User Avatar

    Are you kidding me? The day I publish my first kata, you "coincidentally" publish almost the exact same thing? [rolls eyes]

  • Custom User Avatar

    Thanks! I've updated it. I think I had the same problem with the actual test cases too.
    I've also updated the description to say "to two decimal places".

  • Custom User Avatar

    In your example tests you've got the actual and expected parameters reversed -- see https://www.codewars.com/docs/js-slash-coffeescript-test-reference -- which makes error messages look confusing, like this:

    ✘ Expected: '0.11173326617063674', instead got: '0.11' 
    
  • Custom User Avatar

    And please add at least 3 more fixed assertions before you even begin adding random tests - only 2 fixed assertions in the entire test suite is unacceptable.

  • Loading more items...