Python TypeError: unsupported operand type(s) for -: 'str' and 'str'
<p>I am trying to convert the following code written in Python 2 to code that is compatible with Python 3. I am receiving the following error:</p>

<blockquote>
  <p>File "C:/Users/brand/AppData/Local/Programs/Python/Python35-32/Chââange Maker.py", </p>
  
  <p>line 5, in  CHANGE = MONEY - PRICE</p>
  
  <p>TypeError: unsupported operand type(s) for -: 'str' and 'str'</p>
</blockquote>

<p>Here is the code that I am using:</p>

<pre><code>PRICE = input("Price of item: ")
MONEY = input("Cash tendered: ")
CHANGE = MONEY - PRICE
print ("Change: ", CHANGE)
</code></pre>

<p><code>input()</code> in Python 3 is equivalent to <code>raw_input()</code> in Python 2. Thus, <code>PRICE</code> and <code>MONEY</code> are strings, not integers as you are expecting.</p>

<p>To fix this, change them to integers:</p>

<pre><code>PRICE = int(input("Price of item: "))

MONEY = int(input("Cash tendered: "))
</code></pre>

python