title: How to convert an addition as a string into an integer
body: <p>I have a variable as a string <code>let q1 = "3 + 5"</code> but I want to convert into an integer so that <code>let q1 = 8</code>. I tried using <code>let q1Int: Int? = Int(q1)</code>but it doesn't seem to equal 8. I need to keep q1 as a string at first because I need to display "3 + 5" on the screen. </p>
  
  <pre><code>let q1 = "3 + 5"
  var questionInt: Int? = Int(q1)
  var answerInt: Int? = Int(answer)
  if answerInt == questionInt{
  
        addScore()
  
  }
  </code></pre>
  
  <p>When I change <code>questionInt</code> to 8 it adds to the score but when I try by converting the string to an integer it doesn't.</p>