Browse files

This is me waiting until the last minute.

  • Loading branch information...
1 parent bd376bc commit 2a592a55729e1f13923dbb918e199d8fb42510d6 @kamron committed Feb 25, 2013
Showing with 17 additions and 0 deletions.
  1. +17 −0 pset2min.py
View
17 pset2min.py
@@ -0,0 +1,17 @@
+balance = 4213
+annualInterestRate = 0.2
+monthlyPaymentRate = 0.04
+balance=balance-monthlyPaymentRate
+
+totalPaid=0
+unpaidBalance=balance
+for month in range (1,13):
+ minPayment=unpaidBalance*monthlyPaymentRate
+ totalPaid+=minPayment
+ unpaidBalance=unpaidBalance-minPayment
+ print('Month: ' + str(month))
+ print('Minimum monthly payment: ' + str(round(minPayment, 2)))
+ unpaidBalance+=unpaidBalance*(annualInterestRate/12)
+ print('Remaining balance: ' + str(round(unpaidBalance, 2)))
+print('Total paid: ' + str(round(totalPaid, 2)))
+print('Remaining balance: ' + str(round(unpaidBalance, 2)))

0 comments on commit 2a592a5

Please sign in to comment.