Ad
  • Custom User Avatar

    We programmers know our kind too well

  • Custom User Avatar
  • Custom User Avatar

    This was an error. It is fixed now, pardon me.

  • Custom User Avatar

    In python, everything is being converted to litre:

    input:  ['62.84941093243942kg', '53.658154513228155l', '35.86201398783972kg', '60.192362035708136g', '27.290504036797568l', '73.41130509717529l', '50.297738338756574g', '41.764827450692465g', '4.5587307453964225lb']
    None should equal ['237.91016014365619l', '203.11757809437387l', '135.75206774956845l', '227.8521672499696l', '103.30547398089351l', '277.8911543148473l', '190.39705870752914l', '158.09657783185125l', '17.256619363623617l']
    
  • Custom User Avatar

    One further issue is that you're using "g" for gallons, but this is the SI symbol for grams. The standard symbol for gallons (both US and Imperial) is "gal".

  • Custom User Avatar

    Thank you for the insight. I am glad you properly understand the kata description.

  • Custom User Avatar

    Alright then.

  • Custom User Avatar

    This makes total sense, but I think it would be worth mentioning then, at least as a hint, that calculations have to be exact and that given ratios are also exact.

  • Custom User Avatar

    You need to be more specific (and less parochial) about units. E.g. your gallons appear to be US gallons, but the most of the world uses imperial gallons. This applies to a number of different measures, mainly of volume. See: https://en.wikipedia.org/wiki/Comparison_of_the_imperial_and_US_customary_measurement_systems. Also "English" is the wrong way to describe US/Imperial units.

  • Custom User Avatar

    If I get you correctly, you are asking how the values in the test relate? If that is the issue, in the description you were given a table of values to convert back and forth. For weight, convert kg to lb using the values provided and vise versa. Approximate equality would not work for this as no values were approximated for the result. Please use exact equality.

  • Custom User Avatar

    Exactly @hobovsky. @FArekkusu please explain yourself properly. If this is about random tests, they have been added. Else I need more undestanding of your issue to actually do something about it.

  • Custom User Avatar

    Not that I know, but if somebody asked me, I might suspect that it has something to do with how poorly the issue was reported from noob's poin of view, so they totally did not know what it's about.

    But I don't know.

  • Custom User Avatar

    Why is this resolved? Why do you think the issue I've raised has anything to do with @dfhwze's message?

  • Custom User Avatar

    The result should be checked for approximate equality. As of now, it's impossible to solve the kata without knowing how exactly you're calculating the new values.

  • Custom User Avatar

    No. Kilograms(kg), Pounds(lb), Gallons(g), Litres(l).

    But I can see how that confuses one. This has been updated in the description.
    Sorry for the confusion.

  • Loading more items...