Cody

Solution 1881989

Submitted on 23 Jul 2019 by Xuan Yee
  • Size: 10
  • This is the leading solution.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
principle_amount = 1000; yearly_deposition = 1200; number_years = 50; interest_rate = 0.05; y_correct = 2.752458743867467e+05; assert(isequal(compound_interest(principle_amount, yearly_deposition, number_years, interest_rate),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In compound_interest (line 2) In ScoringEngineTestPoint1 (line 9) In solutionTest (line 3)]

2   Pass
principle_amount = 5000; yearly_deposition = 5500; number_years = 10; interest_rate = 0.02; y_correct = 6.752290690850318e+04; assert(isequal(compound_interest(principle_amount, yearly_deposition, number_years, interest_rate),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In compound_interest (line 2) In ScoringEngineTestPoint2 (line 9) In solutionTest (line 5)]