title: Python quiz code, not printing correct and incorrect when answered
body: <p>can someone help me with this code as it is not producing 'correct' or 'incorrect' when the questions are answered. What im thinking someone will do is when each answer is produced and answered if they got it correct it will say correct but if they have gotten it wrong it will say incorrect. At the moment it just says incorrect when you finish all ten questions.</p>
  
  <pre><code>num1=0
  num2=0
  numofq=0
  
  while numofq &lt;10:
      import random
      num1 = random.randint(1, 10)
      num2 = random.randint(1, 10)
      correctAns = num1 * num2
      question = str(num1) + "x" + str(num2)
      ans = input(question)
      numofq=numofq+1
  if ans == correctAns:
     print ("Correct")
  else:
     print ("Incorrect")
  </code></pre>