• ###### Carlos-Simimcommented on "Jimmy's Car Leasing" kata

That's part of the solution, why would the description show it?

.

• ###### Coderatorcommented on "Jimmy's Car Leasing" kata

Then how can I show that it is an integer division?

lol

• ###### FArekkusucommented on "Jimmy's Car Leasing" kata

`//` is an inline comment in C#...

• ###### Coderatorcommented on "Jimmy's Car Leasing" kata

Changed the first one to
15000km (allowedKmsPerYear) // ( 365 days or 366 days if its a leap year ) = 41km

• ###### FArekkusucommented on "Jimmy's Car Leasing" kata

This change does not address the original issue in any way.

• ###### Coderatorcommented on "Jimmy's Car Leasing" kata

Changed to
(3316km (currentKms) / 2173km (allowedKmsToTargetDate)) * 100 = 152.60% (return value)

• ###### Coderatorresolved an issue on "Jimmy's Car Leasing" kata

Okay, it is fixed too!
I just saw that the allowedKmsPerDay is an integer in C#.
And that's what makes the difference.
Now the sample tests and final tests are the same in both languages.
The only difference is, first final test returns 100 in C# but it is 100.01 in Python.
I don't know if it's a problem.
Thanks again!

• ###### Coderatorcommented on "Jimmy's Car Leasing" kata

Thanks Sir, I changed the solution.
Now it accounts the leap year, but I have a question about the answers.
In C#,
`Codewars.LimitExceeded(new DateTime(2017, 4, 23),new DateTime(2017, 10, 23), 15000, 10777) returns 143.64`
But in Python,
`limit_exceeded(date(2017, 4, 23), date(2017, 10, 23), 15000, 10777) returns 143.30`
Every test is like this, there are small differences between the answers and i don't know why. Do you have any ideas on this?

• ###### dfhwzecommented on "Jimmy's Car Leasing" kata

But I don't think the reference solution in Python does so.
Also check the C# reference solution, and try to find how division is done there, so you can adapt the Python reference solution accordingly.

• ###### Coderatorcommented on "Jimmy's Car Leasing" kata

Oops. I'll try to fix it, sorry.

• ###### dfhwzecommented on "Jimmy's Car Leasing" kata

More specifically, Python does not take into account the leap year and there are some discrepancies concerning integer and float division.

Fixed.

Fixed.