Please use new python test framework.
Please fix it for C++ (warning from test code, not mine):
main.cpp:53:30: warning: comparison of integers of different signs: 'int' and 'std::__cxx11::basic_string<char, std::char_traits, std::allocator >::size_type' (aka 'unsigned long') [-Wsign-compare]
for(int i = 0; i < str.size(); i++)
~ ^ ~~~~~~~~~~
1 warning generated.
Ruby translation kumited :) please review and approve ~~
more maths than code
My solution just passed whilst not taking into account litres less than 5...
That means you probably passed with incomplete / inaccurate solution. Do you remember inputs of a test which you failed before? It might be worth adding some extra tests.
It's a funny thing, I pressed 'Attempt' button and my errors were different each time.
The first time there were legitimate errors. The second time I could not understand the reason and so I pressed 'Attempt' button again and
Voila! It passed...
5 litres per (1,23 - 0,10) = 5,65
Not an issue. Perhaps a suggestion instead.
Descritpion does mention cents, so take your pick: dollars, euros, etc.
The Kata itself is fine - however it should clarify that the value to return is the total cost of the gasoline
(meh... x/ forgot again)
But was: 377.46000000000004d
so close but yet so far...
Units of price is not defined in the description.