Advertisement
UME14

Problem1_PSet2 (final)

Jan 19th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #PSet2_Problem 1
  2. #done!
  3.  
  4. for i in range(12):
  5. monthlyInterestRate = (annualInterestRate)/12.0
  6. minimumMonthlyPayment = monthlyPaymentRate * balance
  7. monthlyUnpaidBalance = balance - minimumMonthlyPayment
  8. updatedBalance = monthlyUnpaidBalance + (monthlyInterestRate * monthlyUnpaidBalance)
  9.  
  10. balance = updatedBalance
  11.  
  12. print('Remaining balance: ' + str(round(updatedBalance, 2)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement