title: Coupon Bond Calculator in Python
body: <p>I'm trying to do coupon bond calculations and keep running into "Type Error must be str, not int" in the below code. I cannot figure out where to make it a string.</p>
  
  <pre><code>"""The equation is the (sum from j to n of (c/(1+i)^j))+ (f/(1+i)^n)"""
  
  print('What Are You Trying To Solve For?')
  startvariable = str(input(' Price (p), Face (f), Years to Maturity (n), Interest Rate (i), Current Yield (cy), YTM (Y)' ).lower() )
  while startvariable == 'p':
      f = (input("Face or Par Value (number only): "))
      i = (input("Interest Rate (as decimal): "))
      c = (input("Coupon (number only): "))
      n = (input("n value:  "))
      j = (input("j (starting) value:  "))
      summation_value = 0
  
      while j &lt;= n:
          for k in range (j, (n + 1)):
              add_me = (c/(1+i)** j)
              summation_value += add_me
              k += 1
          print('Bond Price: ', (summation_value + ((f) / (1 + i) ** n)))
  </code></pre>