I'll add them to the Ruby if you will approve my Haskell translation.
Failed when p = 290, r = -1: 13 should equal 13.5
Failed when p = 326, r = -1: 15 should equal 15.5
Failed when p = 51, r = -1: 1 should equal 1.5
Failed when p = 590, r = -1: 28 should equal 28.5
Failed when p = 711, r = -1: 34 should equal 34.5
Failed when p = 972, r = -1: 47 should equal 47.5
Instructions were to return a positive int.
Failed when p = 305, r = 0: 30 should equal 29
Failed when p = 165, r = 0: 16 should equal 15
Instructions were to round to nearest 10, each of these cases should round p UP from single digit 5, then subtract 1 from T for the 0 r score.
These test cases do not match the instructions in Python 3. Update the translation to have accurate results for Python 3, or restrict to Python 2.
deleted (I misread Voile's message)
Please remember to set rounding mode before rounding so numbers aren't round to nearest even:
With p = 10N + 5, Python's default behaviour is to round p/10 down for even N, and up for odd N.
I suspect the errors are showing up because default rounding is being used in the reference solution, and this only causes an inconsistency with the description in the case of even N.
p = 10N + 5
1) Already raised.
2) Re-raised with more information.
Test case with p = 565 should be added to the fixed tests to filter "naive rounding" solutions.
p = 565
In fact, there should be a whole separate random tests suite with numbers in the form p = 10N + 5 as many of these are rounded in a wrong way.
Because the translation was written in Python 2.
No random tests in Ruby.
-As mentioned below, test cases are expecting unrounded numbers for satisfaction of -1
-In the description, numbers ending in 5 are always rounded up, but in the test cases: Failed when p = 565, r = 0: 56 should equal 55, meaning that 565 should be rounded down to 56 before subtracting one.
Failed when p = 565, r = 0: 56 should equal 55
Trying to finish this kata in python.
Why tests ends with floats, while details says all values of tips are rounded up or down?
Failed when p = 489, r = -1: 23 should equal 23.5
Failed when p = 714, r = -1: 34 should equal 34.5
Failed when p = 270, r = -1: 12 should equal 12.5
Haskell : https://www.codewars.com/kumite/5bbacd982ce533f1dd000122?sel=5bbacd982ce533f1dd000122
This comment is hidden because it contains spoiler information about the solution