Beta
The money in the bank
15dan77
Loading description...
Mathematics
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
There are still tests that test array elements by indexing its values one by one, which will throw an error if the returned value isn't indexable.
They should be replaced with array comparison.
Compound interest for fraction amount of unit of payout period is undefined in real life: Real life interest are paid in specific period (e.g per day/month/year). The kata assumes infinitely fine-grained interval, but it's only a mathematical construct; you can only assume interest is multiplicative and analytically extend the values to all real values between the payout periods (which results in exponentials), but it's a limit.
And all of this was never explained anywhere, so it's only up to pure guessing what payout model is being used by the kata.
JS, as kata is in Beta with a 0% approval, and author is in the wind :
JS :
Added.
Is the cycle of the interest calculate related to the calculation?
Or the cycle of the interest calculate is one day?
This comment has been hidden.
I corrected the conditions in the description and in the test, this kata is about the Effective interest rate https://en.wikipedia.org/wiki/Effective_interest_rate
Can you use
Test.assertSimilar()
to test the array?And I don't know why my result always smaller than yours... ;-)
test1 expect 7.81 but I got 7.52
test2 expect 15984244.49 but I got 15392624.40
Yes, I added some sample test cases, thank you
Yes, they are in Spanish
Me encanta personalmente que lo puedas escribir en Español, solo que hay muchas personas que les va a dificultar por que no hablan una sola palabra ni lo entienden. Te aconsejaría que las traduzcas al Inglés, así más personas van a poder resolver tu kata. Felicitaciones por éste tu primer trabajo presentado. Exitos en Codewars para ti!
Also, having sample test cases might help, though you listed the meaning of the values in the description and should be doable also for people not knowing a Latin language.
I added some sample test cases, thank you
This comment has been hidden.