Hi all - i'm still struggling with problem 1 in pset2 (i know: the deadline is over :(( ).
http://codepad.org/AziXlzDL
I have two questions:
- I suck at economics, and i'm not sure I understand the "minimum payment rate" formula correctly
- I get a syntax
You are missing a bracket in the previous line to close for the "float" call!
thanks - now at least I can run it - but my numbers are completely wrong
For one you don't need to increment the month. The for loop does it automatically!
If "minimum" is your minimum monthly payment then minimum=balance*minMonthlyPayRate ...and these two lines are wrong minimum = float(abs((balance * monthlyPaymentRate)- balance) balance = abs(minimum - balance) Think carefully about *what* values you are updating each month. Also what @Chris2332 said
You've introduced many lines you don't need, and aren't taking into account the given formulas: Monthly interest rate= (Annual interest rate) / 12 Minimum monthly payment = (Minimum monthly payment rate) x (Previous balance) Updated balance each month = (Previous balance - Minimum monthly payment) x (1 + Monthly interest rate) Also keep track of your Total Paid (this not increment by 1 each time) Introduce the formulas inside your loop and print the requested data like you was doing. An advice: round the number at the end, when you print them, to keep your calculations accurate.
thank you all ! I did some reading offline yesterday and it makes a lot more sense now
So did you get everything ok? Do you need anything to be explained more?
Join our real-time social learning platform and learn together with your friends!