File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed 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
213
213
Make it so that the user can set these variables:
214
214
215
215
``` python
216
- extra_payment_start_month = 60
216
+ extra_payment_start_month = 61
217
217
extra_payment_end_month = 108
218
218
extra_payment = 1000
219
219
```
220
220
221
221
Make the program look at these variables and calculate the total paid appropriately.
222
222
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?
224
224
225
225
### Exercise 1.10: Making a table
226
226
Original file line number Diff line number Diff line change 7
7
month = 0
8
8
9
9
extra_payment = 1000.0
10
- extra_payment_start_month = 60
10
+ extra_payment_start_month = 61
11
11
extra_payment_end_month = 108
12
12
13
13
while principal > 0 :
14
14
month = month + 1
15
15
principal = principal * (1 + rate / 12 ) - payment
16
16
total_paid = total_paid + payment
17
17
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 :
19
19
principal = principal - extra_payment
20
20
total_paid = total_paid + extra_payment
21
21
You can’t perform that action at this time.
0 commit comments