File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -213,14 +213,14 @@ Modify the program so that extra payment information can be more generally handl
213213Make it so that the user can set these variables:
214214
215215``` python
216- extra_payment_start_month = 60
216+ extra_payment_start_month = 61
217217extra_payment_end_month = 108
218218extra_payment = 1000
219219```
220220
221221Make the program look at these variables and calculate the total paid appropriately.
222222
223- How much will Dave pay if he pays an extra $1000/month for 4 years starting in year 5 of the mortgage?
223+ How much will Dave pay if he pays an extra $1000/month for 4 years starting in year 5 of the mortgage?
224224
225225### Exercise 1.10: Making a table
226226
Original file line number Diff line number Diff line change 77month = 0
88
99extra_payment = 1000.0
10- extra_payment_start_month = 60
10+ extra_payment_start_month = 61
1111extra_payment_end_month = 108
1212
1313while principal > 0 :
1414 month = month + 1
1515 principal = principal * (1 + rate / 12 ) - payment
1616 total_paid = total_paid + payment
1717
18- if month > extra_payment_start_month and month <= extra_payment_end_month :
18+ if month >= extra_payment_start_month and month <= extra_payment_end_month :
1919 principal = principal - extra_payment
2020 total_paid = total_paid + extra_payment
2121
You can’t perform that action at this time.
0 commit comments