Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- balance= float((raw_input('Enter the outstanding balance on your credit card: ')))
- annualinterestrate= float((raw_input('Enter the credit interest as a decimal: ')))
- minmonthlypaymentrate= float((raw_input('Enter the minimum monthly payment rate as a decimal: ')))
- Monthlyinterestrate = annualinterestrate/12
- nummonths = 1
- totalamtpaid = 0
- while nummonths <= 12:
- minmonthlypayment = round(minmonthlypaymentrate * balance,2)
- interestpaid = round(Monthlyinterestrate * balance,2)
- principalpaid = (minmonthlypaymentrate - interestpaid
- balance = principalpaid
- print('month:',nummonths)
- print('minimum monthly payment:',minpayment)
- print('remaining balance:',balance)
- nummonths+= 1
Advertisement
Add Comment
Please, Sign In to add comment