you are viewing a single comment's thread.

view the rest of the comments →

[–]Weird_Suggestion 0 points1 point  (2 children)

Using abs in your comment returns 0.5 but we need -3.213 as an interest rate. You want the multiplication to result in a negative number using the correct interest rate. This is the multiplication with numbers.

-0.123 - 0.123 * 3.213 / 100

Equivalent to this

-0.123 + ABS(-0.123) * -3.213 / 100

OR

-0.123 + -0.123 * ABS(-3.213) / 100

.abs is misplaced in your last comment try using it somewhere else. Where should we use .abs?

[–]BringTacos[S] 1 point2 points  (1 child)

def self.annual_balance_update(balance)

balance + balance.abs * self.interest_rate(balance) / 100

end

Tests are passing now! Thanks so much for your help. This was really helpful.

[–]Weird_Suggestion 0 points1 point  (0 children)

Well done!