title: ValueError: invalid literal for int() with base 10 How to fix error
body: <pre><code>import random
  import operator
  
  
  op = {"+":operator.add,
        "-":operator.sub,
        "*":operator.mul}
  num1 = random.randint(0,10)
  num2 = random.randint(0,10)
  ops = random.choice(list(op.keys()))
  print (num1 + int(ops) + num2)
  </code></pre>
  
  <p>I am trying to make a random math question quiz and I cannot work out why I keep getting the error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "N:/Computer science/A453/Test.py", line 12, in &lt;module&gt;
      print (num1 + int(ops) + num2)
  ValueError: invalid literal for int() with base 10: '-'
  &gt;&gt;&gt; ================================ 
  </code></pre>