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.
Yours is more readable than mine, but my logic is a bit cleaner.
Similar logic, but much cleaner than mine. Nice!
OK
You could understand the variable months like this, months=1 is the end of the first month, months=2 is the end of the second month, ..., month=0 means you are going to buy a car.
Similar to my solution.
This is basically a similar solution to mine. What I dont get though is why do we have to put the if months % 2 before the budget calculation in the while loop. The dexcription says the interest is increased at the END of every two months, so shouldnt the loss be increased AFTER the budget is updated.
By the logic of the current code, wont the interest rate be updated on the second loop, which is calculating only the second month?