Reputation: 13
I'm brand new to python, and programming in general, so this is probably something extremely simple, but I'm persistently getting this syntax error at the end of the line defining my function for minPayment. I can't see any problem with it... here is the program so far.
print 'Month 1'
OutstandingBalance = raw_input(float('enter your balance'))
AnnualInterestRate = raw_input(float('enter rate as a decimal(%/100)'))
MinimumMonthlyPaymentRate = raw_input(float('enter minimum monthly payment rate as a decimal(%/100)'))
def minPayment:
minPayment = MinimumMonthlyPaymentRate * OutstandingBalance
print 'minimum payment='minPayment
return minPayment
def accIntrst:
accIntrst = (AnnualInterestRate/12.0) * OutstandingBalance
print 'accrued interest = 'accIntrst
return accIntrst
def balPaid:
balPaid = accIntrst - minPayment
print 'balance paid = 'balPaid
return balPaid
def remBal:
remBal = OutstandingBalance - balPaid
print 'remaining balance = 'remBal
return remBal
Any feedback is greatly appreciated!
Upvotes: 1
Views: 44
Reputation: 2488
Add parentheses to your functions. Python syntax dictates so.
So, instead of def minPayment:
, write def minPayment():
instead.
Upvotes: 1