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.
one on the expected answers with c has a 1 all the way in the 10thousandths place.
Enabled in this fork
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Also description is inconsistent here:
These are for all languages except JavaScript
This is for JavaScript
All-in-all, the rounding requirement should be removed for all languages (in-accordance with issue below) and replaced with the description in JavaScript
This comment is hidden because it contains spoiler information about the solution
All languages should follow Java by using approximate equality comparison when writing custom tests
fork approved, issue fixed
That's because 2.35 is the conversion factor from mpg to kpl of a US gallon. The kata is specifically asking about imperial gallons, which are larger than US gallons. It's better to just use the numbers provided in the kata rather than search online for a conversion factor anyway, otherwise you are likely to run into rounding errors.
in python, this doesn't work...
return mpg / 2.35
10 - 4.25 (rounded) - expected 3.54
typed on calculator, got 4.25 (again rounded)
the problem comes from your code. you do not use the appropriate datatypes (note the return type)
problem with big numbers at random test on C.
Mathematics are correct, idk what wrong with them. Example:
Submitted: 7.636e+07
Expected: 7.64e+07
This comment is hidden because it contains spoiler information about the solution
Задание чтобы вспоминить цикл for, создание листа и добавление в него
Print the input to help you debug your code, but your problem is about how you set the initial value of small2. Read this, please: https://docs.codewars.com/training/troubleshooting
Loading more items...