title: In my python quiz generator, when i test the program, it tells me my answer is wrong but it is not as i have checked by printing answer
body: <pre><code>import random
  
  questions = 1
  score = 0
  
  input(&quot;Please enter your name: &quot;)
  
  operator = [&quot;+&quot;,&quot;-&quot;,&quot;*&quot;]
  
  while questions&lt;10:
    num1 = (random.randint(0,15))
    num2 = (random.randint(0,15))
    picked_operator = random.choice(operator)
    print(&quot;What is &quot; + str(num1) +str(picked_operator) +str(num2), &quot;?&quot;)
    question = '{} {} {}'.format(num1, picked_operator, num2)
    answer = input()
    if answer == eval(question): 
      print(&quot;You are correct&quot;)
      score = score+1
    else:
      print(&quot;incorrect&quot;)
    questions = questions + 1  
    print(answer)
  </code></pre>
  <p>example of what is printed:
  please enter your name:  dan
  what is 11 + 3?
  14
  incorrect
  14
  what is 13-7?
  ................</p>