Beta

The money in the bank

Description
Loading description...
Mathematics
Fundamentals
View
AllIssues3Questions1SuggestionsShow Resolved
  • Please sign in or sign up to leave a comment.
  • Voile Avatar

    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.

  • Voile Avatar

    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.

  • cliffstamp Avatar

    JS, as kata is in Beta with a 0% approval, and author is in the wind :

    • fixed the naming convention to camelCase
  • cliffstamp Avatar

    JS :

    • does not have random tests
  • myjinxin2015 Avatar

    Is the cycle of the interest calculate related to the calculation?

    Or the cycle of the interest calculate is one day?

  • myjinxin2015 Avatar

    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

  • dan77 Avatar

    Yes, they are in Spanish

    • raulbc777 Avatar

      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!

    • GiacomoSorbi Avatar

      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.

    • dan77 Avatar

      I added some sample test cases, thank you

  • raulbc777 Avatar

    This comment has been hidden.