Guest User

Untitled

a guest
Jan 22nd, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. def ccOneYear(balance, annualInterestRate, monthlyPaymentRate): Monthly_interest_rate=annualInterestRate/12.0 Minimum_monthly_payment=(monthlyPaymentRate)*(balance)
  2. Total=0 i=1 while(i<=12): Total=Total+Minimum_monthly_payment print 'Month: '+str(i) print('Minimum monthly payment: '+str(round(Minimum_monthly_payment,2))) balance=(balance-Minimum_monthly_payment)*(1+Monthly_interest_rate) print('Remaining balance: '+str(round(balance,2))) Minimum_monthly_payment=(monthlyPaymentRate)*(balance) i=i+1 print ("Total paid: " + str(round(Total,2))) print ("Remaining balance: " + str(round(balance,2)))
Add Comment
Please, Sign In to add comment