title: Write a function to calculate the average of two numbers.(Python.) Keeps getting a name that is not defined
body: <p>Alright, so I am new with python at the moment and I am absolutely confusing myself with such a simple task. I have to write a function to calculate the average  of two numbers, but the user must input the numbers so the average should print out. </p>
  
  <p>I keep getting a a name error, name 'number2' is not defined.Below is my code.          </p>
  
  <pre><code>number1 = raw_input("Enter number1")
  number2 =raw_input("Enter number2")
  
  def average(number1, number2):
    return (number1 + number2) / 2
  avg=average = (number1,number2)
  print avg 
  </code></pre>
  
  <p>I'm doing something wrong and I know its obvious but I can't quite put my finger on it. </p>