title: Python TypeError: unsupported operand type(s) for -: 'int' and 'function'
body: <p>I am a beginner in Python and am working on an assignment.  I keep getting <code>TypeError: unsupported operand type(s) for -: 'int' and 'function'</code> even after researching the error and applying the suggested fixes.  I'm not looking for anyone to hand me a solution, but I would appreciate a second look.  I'm missing something but I don't know what.  This is the section of code I'm having trouble with:</p>
  
  <pre><code>month = 0
  interestYDT = 0
  balance = int(raw_input ("Enter balance on credit card: "))
  annualInterestRate = float(raw_input ("Enter annual interest rate as a decimal: "))
  monthlyPaymentRate = float(raw_input ("Enter minimum monthly payment rate as a decimal: "))
  previousbalance = balance
  #
  def monthlyInterestRate(annualInterestRate):
      return float(annualInterestRate/12)
  #
  if month &lt;= 12:
      def minimumMonthlyPayment(previousbalance):
          return (previousbalance * monthlyPaymentRate)
      def monthlyInterest(monthlyInterestRate):
          return (1 + monthlyInterestRate)
      minMonPay = minimumMonthlyPayment
      monInt = monthlyInterest
      newbalance = ((previousbalance - minMonPay) * (monInt))
      interestYDT = (interestYTD + montInt)
      previousbalance = (newbalance)
      print ''
      print ('Month:' (month))
      print ('Minimum monthly payment: $ ' (round(minimumMonthlyPayment, 2)))
      print ('Remainging balance: $ ' (round(newbalance, 2)))
      print ' '
      month = (month + 1)
  </code></pre>
  
  <p>This is the entire error I get:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/Users/Karla/Documents/_MIT 600X Introduction to CS and Prog/Assignments/Week2/kmarciszewski_week2_Problemset_Problem1.py", line 33, in &lt;module&gt;
      newbalance = ((previousbalance - minMonPay) * (monInt))
  TypeError: unsupported operand type(s) for -: 'int' and 'function'
  </code></pre>
  
  <p>I'd really appreciate any insight. Thank you.</p>