Ad
  • Custom User Avatar

    I had this same issue in Python. This test is the issue: Test.assert_equals(race(820, 850, 550), [18, 20, 0]) My math (same as above math) calculates 59.99999999999574 seconds, which if stored with less precision would return 60 if converted to int. I think that test should just be removed or altered slightly so as to not produce an amount of seconds so close to 60.

  • Custom User Avatar

    hmmm... although im not so sure, but it could be due to rounding errors. why dont you try convert the velocity from feets/hours to feets/seconds and try it again,it may give more accurate results.

  • Custom User Avatar

    I had a similar problem on the python kata ...

    it is a float precision problem - if you print your values, you will see.
    In my opinion the test cases are not well selected for "the fractions of a second won't matter" description

  • Default User Avatar
  • Default User Avatar

    563 guys passed the JS kata so it is not an error of the kata.
    Post a question about your code, not an issue.