Skip to content

Instantly share code, notes, and snippets.

Created July 30, 2013 20:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/6116595 to your computer and use it in GitHub Desktop.
Save anonymous/6116595 to your computer and use it in GitHub Desktop.
Why am I getting a syntax error when I try to assign the variable 'remainder?'
outbal = float(raw_input('Enter the outstanding balance on your credit card:'))
Annualintrate = float(raw_input('Enter the annual credit card interest rate as a decimal:'))
x = 1.0
month = 1
while (remainder > 0.0):
while (month <= 12.0):
initialmonthlyballance = round(float(((annualintrate /12)*outbal)+outbal, 2)
remainder = round(float(initialmonthlyballance - (x*10)))
if (remainder >= 0):
month += 1
Outbal = reamainder
else:
print 'Monthly payment to pay off debt in 1 year:', x10
print 'number of months needed:', month
print 'Balance:' remainder
if (reamainder > 0):
x = x + 1
else:
print 'Monthly payment to pay off debt in 1 year:', x10
print 'number of months needed:', month
print 'Balance:' remainder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment