Ad
  • Custom User Avatar

    Hey, I like fractions.

    I found a similarly-themed kata, "Cogs" (https://www.codewars.com/kata/59e1b9ce7997cbecb9000014) but that kata wants only the rotation of the final cog in a decimal representation.

    Suggestion It might be nice to add the word "fraction" in the description. Either that or specifically call out that you're looking for the output to be simplified or "reduced to lowest terms" or something.

  • Custom User Avatar

    of course 👍

  • Custom User Avatar

    yes, it's not a physics problem, it's actually a pure theoretical math problem.

  • Custom User Avatar

    I'm confused... Is the aircraft meant to travel at a constant speed?

  • Custom User Avatar
  • Custom User Avatar

    This issue is incomplete.

    DO NOT ROUND and use approximate comparison.

    Did you read available documentation on publishing your first kata? This is in there ( though Do Not Round may not be in there, which would be a serious omission ).

  • Custom User Avatar

    That note is an Issue.

    No random tests.

  • Custom User Avatar

    the description is incomplete: you never said that the aircraft is moving in straight line only.

  • Custom User Avatar
     given random inputs
    expected 19 to deeply equal 20
    

    -> you need to use approximate comparison, otherwise your random tests are subject to floating point errors

    it happens for h,a,s = 10 210 1

    Note: your random tests aren't random at all....