0

Hello,

I was seeking help in why my small program/script is not performing the way I would like. Here is the question.

Write a program to calculate the credit card balance after one year if a person only pays the

minimum monthly payment required by the credit card company each month.

Use raw_input() to ask for the following three floating point numbers:

1. the outstanding balance on the credit card

2. annual interest rate

3. minimum monthly payment rate

Here is my code:

```
balance = float(raw_input('Enter your ourstanding debt. '))
annuainterest= float(raw_input('Enter your annual interest rate in decimal. '))
minmonpayrate = float(raw_input('Enter your minimum monthly payment rate in decimal. '))
for month in range(1,13):
print 'Month: ' + str(month)
interest = float(round(annuainterest/12*balance,2))
minpayamount = float(round(balance*minmonpayrate,2))
print 'Minimum monthly payment: ' +str(minpayamount)
principal = float(round(minpayamount-interest,2))
print 'Principal: ' + str(principal)
rembalance = float(round(balance - principal,2))
print 'Remaining Balance: ' + str(rembalance)
```

The program list the months correctly but does not redue the math for each month can anyone help? Thank you!