title: Rounding floats to nearest 10th
body: <p>I am trying to round an equation of two float numbers but it outputs without the decimals, it just rounds it to the nearest number for example 21.3 to 21. When I put ", 2" which should set it to round to the nearest 10th.</p>
  
  <p>New code:</p>
  
  <pre><code>def add(op1,op2):
      result = int(round(op1 + op2, -1))
      print("")
      print ("Output: %d + %d = %d" % (op1, op2, result))
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Output: 10 + 10 = 20
  </code></pre>
  
  <h3>NEW</h3>
  
  <p>Output:</p>
  
  <pre><code>Output: 10.3 + 10.9 = 21.0
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>def add(op1,op2):
      result = int(round(op1 + op2, 1))
      print("")
      print ("Output: %0.1f + %0.1f = %0.1f" % (op1, op2, result))
  </code></pre>