title: Python list index is out of range error
body: <p>I've been tasked with making a Quiz app for a school project. It's meant to ask the user how many questions they want, and they then enter all of the Q&amp;A's. Once finished, someone will then take the test. </p>
  
  <p>The problem is, I'm getting an <strong>IndexError</strong> from the <strong>results</strong> function. This function is supposed to compare the test answers with the user's answers and print out a score.</p>
  
  <pre><code>def results(testAnswers, userAnswers):
      score = 0
      for i in range(0, len(answers)):
          if testAnswers[i].lower().strip() == userAnswers[i].lower().strip():
              score += 1
  
      print("\nResults: You got " + str(score) + " out of " + str(len(answers)) + "!")
  </code></pre>
  
  <p>Does anyone know how I can fix this problem?</p>