Ad
  • Custom User Avatar

    thanks! It's fixed now

  • Default User Avatar

    THANK YOU. I wondered why I was spiraling into infinite loops.

  • Default User Avatar

    Yes, the taxes part left me really confused. We don't do taxes here were I live, so I had no idea how I was supposed to gain money with those percentages...

    What about something like after paying taxes 'T' based on the year's Interests, the new sum is re-invested ?

  • Default User Avatar

    I support this change, especially the hint for the tax is very very helpful!

  • Custom User Avatar

    Hi! :)
    As I struggeled with the description doing the Kata, I tried to reword it in order to make it more understandable.

    Mr. Scrooge has a sum of money 'P' that he wants to invest. Before he does, he wants to know how many years 'Y' this sum 'P' has to be kept in the bank in order for it to amount to a desired sum of money 'D'.

    The sum is kept for 'Y' years in the bank where interest 'I' is paid yearly. After paying taxes 'T' for the year the new sum is re-invested.

    Note to Tax: not the invested principal is taxed, but only the year's accrued interest

    [...]

    Assumption: Assume that Desired Principal 'D' is always greater than the initial principal. However it is best to take into consideration that if Desired Principal 'D' is equal to Principal 'P' this should return 0 Years.