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.
Amazing, it's just perfect. I know specially the test cases are not giving a proper feedback to the user but I had a bit of a bad time trying to figure out how to make it work. Thank you very much for the translations again!!
Thank you so much for the translation Giacomo! They are approved already. I would like to have random test cases for the JS version too :D
Amazing, thanks! :)
Perfect. I didn't knew about the +. Now every value with decimals that you return has to be rounded to 2 decimals. Give it another try!
You're totally right! Actually I tried before to use rounded decimals, the problem is that I could only think of using toFixed(2), but it is giving back a string, and even using parseInt() on it, for some strange reason, the system didn't recognize the number even though it was the same: after trying that the system was saying (as an example) Expected: 4444, instead got: 4444.
Anyway, I'll try to think of a different easy way of rounding, I think people don't need to write a whole rounding function.
Done! I did some fixes and I added one test case for the second function! Enjoy!
Sorry about that! I updated the consumption on the description to be l/100km and changed the function according to that and I also fixed the typo!
Thanks for the feedback!
Also note that the second function has been updated as it had a bug. Before it was already taking out petrol even when you where on 0 km (now petrol on 0 km driven should be the original)
Sorry about that! I updated the consumption on the description to be l/100km and changed the function according to that.
Thanks for the feedback!
Also note that the second function has been updated as it had a bug. Before it was already taking out petrol even when you where on 0 km (now petrol on 0 km driven should be the original)
Polish a bit the description and I think it's ready to go!