Ad
  • Default User Avatar

    Thanks for pointing that out! I'll go fix it right away! :)

  • Default User Avatar

    First i deleted rounding because your right, it was unnecessary. But i do not understand your points. First of all what do you mean by having to convert the output to use the wrong data type? I still think validating the input is necessary because maybe in real life this function works on user input. Also i do not understand what you mean converting the input because it uses wrong data type? All i say is that when it's an invalid input you should return -1 that in this case indicates an error.

  • Default User Avatar

    I deleted rounding because it caused too many errors. :)

  • Default User Avatar

    Rounding has been deleted.

  • Custom User Avatar

    What about the function name?

  • Custom User Avatar
    • Convert the input because it uses wrong data type
    • Convert the output to use wrong data type
    • Round the result
    • Validate the input

    None of these add any depth to the task.

  • Default User Avatar

    Added.

  • Default User Avatar

    .

  • Default User Avatar

    I changed it to win to game ratio :)

  • Default User Avatar

    Could you please clarify, dosen't that just add extra depth to the kata?

  • Custom User Avatar

    No fixed tests with points = 0.

  • Custom User Avatar

    Return as a decimal number rounded to two decimal points

    The values should be compared exactly.

  • Default User Avatar
    [[32389, 22127], [24239, 26386], [35505, 5438], [19842, 29839], [2165, 44638], [15853, 20100], [34775, 10035], [18023, 8080], [16940, 39235], [13196, 47871], [10436, 23432], [37855, 3481], [27006, 27696], [48579, 1371], [38778, 28589], [2005, 20926], [48849, 42677], [36083, 40607], [40287, 17276], [3382, 19933], [2469, 15405], [20019, 29511], [31063, 19490], [37581, 34614], [46731, 40590], [29825, 31602], [46106, 8426], [30772, 44586], [3537, 6876], [44440, 45111], [10081, 12059], [31576, 3372], [13530, 37218], [11621, 44384], [19052, 6414], [16140, 17505], [19643, 30917], [27822, 26460], [49786, 28936], [5871, 38528]]
    0.43 should equal 0.42
    

    That's 17/40 == 0.425. The expected rounding direction isn't specified.

  • Default User Avatar

    Well thats pretty much how many games you have won of all the games you have played. So let's say you win 15 out of 20 games then you lost five and won 15. When dividing wins by all games you get the precentage in decimals of how many games of lets say 100 games you win and you lose the rest. But i do understand your point. I just tought it might be more fun this way.

  • Custom User Avatar

    If you have a situation where a list is empty, the list consists of an invalid amount of items or one of the values is negative you should return -1

    Input validation is a worthless requirement.

  • Loading more items...