Ad
  • Custom User Avatar

    It didn't work for me; problem is, the test cases have different result than what the actual formula gives. Am i doing something wrong?

  • Custom User Avatar

    Hello everyone, i'm here to say that case tests for Java are broken, since when the program runs the "convertToCelsius" function correctly debugged, it gives back results which are different from the ones in the test cases.
    Can someone fix it or can i..?

    Thank you for reading, best regards.

  • Custom User Avatar

    You are right, rounding requirements for this kata are off. You need to recreate formula exactly, i.e. celsius = (fahrenheit - 32) * (5/9). When I used celsius = (fahrenheit - 32) * 5 / 9, which is effectively the same, my answers got rejected due to rounding.

  • Custom User Avatar

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

  • Custom User Avatar

    The expected results that are generated for the random test cases are being rounded before being converted into strings. Since the expected result is a string, it isn't possible to pass by returning a float. When you convert a float to a string it's rounded automatically for you. Passing this in python would require replicating the exact same rounding method at a bit level in order to produce exactly the same string in every case.

    The kata could be altered to accept a float value as the result. But as it is written now it requires concatenating with 'is freezing temperature' first

  • Custom User Avatar

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

  • Custom User Avatar

    Test description for python mentions rounding to 1 decimal place, but randomized tests require rounding to a changing number of decimal places.

    '-28.333333333333332 is freezing temperature' should equal
    '-28.333333333333336 is freezing temperature'
    '103.88888888888889 is above freezing temperature' should equal
    '103.8888888888889 is above freezing temperature'

    The tests appear to be generated by a typed library using a double. Rounding in this manner is incompatible with untyped languages. You should change the kata to round to 1 decimal place per your description to provide logical compatability.

  • Default User Avatar

    hey anyone wanna do follow for follow. im new to codewars.

  • Default User Avatar

    thank you chrono79

  • Custom User Avatar
  • Custom User Avatar

    4698 persons completed this kata in Python, are you expecting all of them to reply?

  • Default User Avatar

    hey all plz reply to me if you have completed this

  • Default User Avatar

    hey im a bit stuck can anyone help