title: All I get is "NameError: name 'x' is not defined" error
body: <p>I am new to python and I am trying to make a function that calculates the derivative of another function. So far I have this code</p>
  
  <pre><code>def f(x):
     return x**2 + x - 5
  
  def derivative(f,x,h):
      return 1/(2*h) * (f(x+h) - f(x-h))
  
  print derivative(f(x),4,6)
  </code></pre>
  
  <p>but when I try to run it I get "NameError: name 'x' is not defined" error, can someone help me? </p>