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.
g964: The example is correct (and very useful); the description's wording is certainly inaccurate, however.
To be fair, I think a lot of people learnt a few things from solving this kata: Always be very careful when reading (or writing) your problem description; use tests and logging to make sure the behaviour of your code matches with the expected reality!
Depreciation is not something that suddenly occurs at a single moment. It is a process that takes place over a period of time.
If depreciation rate increases in the end of a month (say Feb 28 23:59), that normally means it will only start excercising its depreciating effect from March 01, 0:00 on.
So, according to description, if rate changes end of second month, then first 2 months must be discounted/depreciated at a rate of 1.5.
A theoretical case can be made that the amortisation rate is not from regular wear, but from somebody with a crowbar smashing the car in very regular intervals just before end of month. But no talk of such thing in the description.
jimmy.clayton is correct in their 1. remark.
wrong:
wrong: