Monthly credit card payment calculator shows Syntax Error
<p>This program is supposed to calculate the credit card balance after one year if a person only pays the minimum monthly payment required by the credit card company. When I try to run it, it shows a SyntaxError, and I'm not sure why. Here's my code:</p>

<pre><code>def ccb(balance, annualInterestRate, monthlyPaymentRate):
    monthlyInterestRate = annualInterestRate / 12.0
    month = 0
    for calc in range(12):
        minMonthlyPaymentRate = balance * monthlyPaymentRate
        unpaidBalance = balance - minMonthlyPaymentRate
        interest = monthlyInterestRate * unpaidBalance
        print ("Month | Balance | Unpaid Balance | Interest")
        print (month + " | " + round(balance) + " | " + round(unpaidBalance) + " | " + Interest)
        balance = unpaidBalance + Interest
        month += 1 
    print ("Remaining balance: " + round(balance))
</code></pre>

<p>A few things (though none appear to throw SyntaxError - seconding Andrew in the comments, if it's a SyntaxError - share the full message):</p>

<p>1) You can't implicitly make an integer a string, you need to cast it. Ex:</p>

<pre><code>str(round(balance))
</code></pre>

<p>instead of</p>

<pre><code>round(balance)
</code></pre>

<p>2) 'Interest' is never defined, but 'interest' is.</p>

<p>With those fixed, it runs fine.</p>

<p>Also, <a href="http://meta.stackoverflow.com/questions/334822/how-do-i-ask-and-answer-homework-questions">this</a> might be relevant ;)</p>

python syntax-error banking