Ad
  • Custom User Avatar

    Missing empty strings and one-word string (no spaces) in sample && fixed tests of

    • CS

    • Crystal

    • C#

    • D

    • Elixir

    • Go (Only empty string test is missing)

    • Java

    • JS

    • PHP (Only one-word string test is missing)

    • Racket

    • Rust (Only empty string test is missing)

    • TS

  • Custom User Avatar

    This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/196.
    Please join the discussion to help us identify duplicate kata and retire them.

  • Custom User Avatar
    expected 'Please provide your mass in Kg' to equal 'Easy tiger, this is far too much power! Something is broken or you are a God, either way report this to reception please'
    

    Input validation order is not specified; the description did not say the validation should be done in order, and by common sense value checks should not come before type checks.

  • Custom User Avatar

    How about this?

    public class Solution { public static string[] StringToArray(string str) { return new string[0]; } } }

    Test Failed
    Expected is <System.String[1]>, actual is <System.String[0]>
    Values differ at index [0]
    Missing: < <string.Empty> >

    1. Test Failed
      Expected is <System.String[6]>, actual is <System.String[0]>
      Values differ at index [0]
      Missing: < "63C4PJK", <string.Empty>, "UG1"... >

    2. Test Failed
      Expected is <System.String[2]>, actual is <System.String[0]>
      Values differ at index [0]
      Missing: < <string.Empty>, "NGPIQNZ3LDFZ46GQ" >

    3. Test Failed
      Expected is <System.String[3]>, actual is <System.String[0]>
      Values differ at index [0]
      Missing: < "0DTFT", "91XM2ANRPN6OK0PB", <string.Empty> >

    etc.

    How can test wait for <string.Empty> if only non-empty strings are allowed in result array?

  • Custom User Avatar

    Some languages have random number of spaces between the words while others always use a single space. The JavaScript version which is very likely to be the original one uses the latter.

  • Custom User Avatar

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

  • Custom User Avatar

    Add test cases for words with in all lower case.

  • Custom User Avatar

    No random tests in Go

  • Custom User Avatar

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

  • Custom User Avatar

    Expected '#("Robin" "Singh"), but instead got '("Robin" "Singh")
    what # mean? I has forget about racket,can someone help?
    how can I return a form like '#("Robin" "Singh")?

  • Custom User Avatar

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

  • Custom User Avatar

    Description :

    It is likely that this "We will take the relationship between Joules counted by the machine and the extra Calories burnt by the person to be a linear relation with the weight of that person." is stopping solutions.

    This is a low level kata (programming wise) however a lot of novice programmers might not be able to deduce from that line alone how to relate the variables.

    You might want to add something explicit like "every 100 kg then ..." otherwis this might be stuck at a low number of solutions.

  • Custom User Avatar

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

  • Custom User Avatar

    I suggest to put in the instructions that the tests are performed against perfect float point number equality or else I would implement a fixed error tolerance (myVar.toFixed(margin)).


    Indeed it wasn't too hard to solve the kata, I had to learn a lot about regex though.
    The difficult part was dealing with having to go through strings such as 0.6666666e+10, which I couldn't figure out why were giving me errors, until I realized I had to parse these strings and return an exact number in order to pass the test (by exact number I don't just mean a number, I mean the number expected by the test case with zero error tolerance).

    If the purpose of this is to add difficulty to the problem then I would state in the instructions that long floating numbers might appear (i.e. 1.232323232e+n) and the test cases have a zero error tolerance, otherwise I think it's a nice kata

  • Custom User Avatar

    It would be good to add some additional condition that extra spaces between words should be removed. I.e., my solution, which was accepted, returns ['Abc', '', 'Xyz'] as an output for 'Abc Xyz', there are two spaces between.
    Best
    TI

  • Loading more items...