What is causing "TypeError: not all arguments converted during string formatting"
<p>This code produces the error:</p>

<pre><code># -*- coding: utf-8 -*-
amount = float(input("Enter the purchase price please."))
down_payment=amount *0.10
monthly_rate = (amount - down_payment) *.05

ending_balance=amount-down_payment

print("|Ã-6s|Ã-16s|Ã-9s|Ã-8s|Ã-14s|" % ("Month" , "Current Balance" , "Interest" , "Payment" , "Ending Balance"))
month = 1
while True:
    starting_balance = ending_balance
    interest = starting_balance * 0.01
    final_amount = (starting_balance+interest)

    if monthly_rate &gt; final_amount:
          monthly_rate = final_amount


    ending_balance = final_amount - monthly_rate

    print("|Ã-6f|Ã-16f|Ã-9f|Ã-8f|Ã-14f|" % (month , starting_balance , interest , monthly_rate , ending_balance))
    month+=1

    if ending_balance &lt;= 0:
      break
</code></pre>

<p>Error:</p>

<pre><code>&lt;module&gt;
  print("|Ã-6s|Ã-16s|Ã-9s|Ã-8s|Ã-14s|" % ("Month" , "Current Balance" , "Interest" , "Payment" , "Ending Balance"))
TypeError: not all arguments converted during string formatting
</code></pre>

<p>You have to use <code>%</code> instead of <code>Ã</code> in your formating strings.</p>

<pre><code>print("|%-6s|%-16s|%-9s|%-8s|%-14s|" % ("Month" , "Current Balance" , "Interest" , "Payment" , "Ending Balance"))
</code></pre>

<p>and</p>

<pre><code>print("|%-6f|%-16f|%-9f|%-8f|%-14f|" % (month , starting_balance , interest , monthly_rate , ending_balance))
</code></pre>

<p>And see: <a href="https://pyformat.info/" rel="nofollow">https://pyformat.info/</a></p>

python