Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I also dont understand it
The description isn't making any claim.
@hobovsky - thank you!! you help me
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?
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.
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 usedcelsius = (fahrenheit - 32) * 5 / 9
, which is effectively the same, my answers got rejected due to rounding.This comment is hidden because it contains spoiler information about the solution
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
This comment is hidden because it contains spoiler information about the solution
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.