I have a homework to do and i did it. I am 95 % sure its a corect code. I dont have a clue why but unfortunally i got Syntax error in one of the lines. Here is my code:
month = 1
totalPaid = 0
while month <= 12:
print('Month: ' + str(month))
print('Minimum monthly payment: ' + str(round(monthlyPaymentRate * balance), 2)
balance = round((balance - (monthlyPaymentRate * balance)) * (1 + (annualInterestRate/12)),2)
print('Remaining balance: ' + str(round(balance, 2)))
month = month + 1
totalPaid = totalPaid + round((monthlyPaymentRate * balance), 2)
print('Total paid: ' + str(totalPaid))
print('Remaining balance: ' + str(balance))
I got Syntax error on this line: balance = round((balance – (monthlyPaymentRate * balance)) * (1 + (annualInterestRate/12)),2). It is probably something very simple but i am novice in Python and cant understand what exactly is the problem, i know that Python is very sensative about spaces and indents and i was carefull about that. Any suggestions ?
has three open parens, but two close parens.