title: Python Error: 'int' object is not iterable
body: <p>I am trying to write a math quiz program for my Python class, but I keep getting an error with the <code>sum()</code> function. The error is:</p>
  
  <pre><code>'int' object is not iterable.
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>import random
  import math
  
  def main():
    print('This is a simple math quiz that will test your addition skills.\n')
    print('\tGood Luck!\n\n')
  
    # Get two random integers
    num1 = random.randint(1, 1001)
    num2 = random.randint(1, 1001)
  
    print('What is the sum of ', num1, ' and ', num2, '?')
  
    student_answer = int(input('Enter your answer, then press Enter: '))
  
    answer = sum(num1, num2)
  
    if student_answer == answer:
      print('Congratulations! You got it right!')
    else:
      print('Sorry, your answer is not correct!')
  
    print(answer)
  
  main()
  
  def sum(number1, number2): 
      return number1 + number2
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\Terrence\Desktop\Python Assignments\Chapter 6\Math Quiz.py", line 29, in &lt;module&gt;
      main()
    File "C:\Users\Terrence\Desktop\Python Assignments\Chapter 6\Math Quiz.py", line 20, in main
      answer = sum(num1, num2)
  TypeError: 'int' object is not iterable
  </code></pre>