title: Python syntax error on def sum(num1, num2)
body: <p>I'm in a beginners programming class and I'm supposed to get this code working, I've typed it in exactly as the book says over and over and I'm getting an Invalid Syntax error and in Python Idle is highlights def in def sum(num1, num2)
  I've looked everywhere, in the book, online and have yet to find an answer as to why it is giving me an error.</p>
  
  <pre><code>#this program uses the return value of a function
  
  def main():
      #Get the user's age
      first_age = int(input('Enter your age: '))
  
      #Get the user's best friend's age.
      second_age = int(input("Enter your best friend's age: "))
  
      #Get the sum of both ages
      total = sum(first_age, second_age)
  
      #Display the total age
      print('Together you are', total, 'years old.')
  
  #the sum function accepts two numeric arguments and
  # return the sum of those arguments.
  def sum(num1, num2):
      result = num1 + num2
      return result
  
  #Call the main function
  
  main()
  
  SyntaxError: invalid syntax
  </code></pre>