title: How to fix the error: takes 1 positional arguments but 2 were given?
body: <p>Problem: I would like to fix the error below.
  f() takes 1 positional arguments but 2 were given
  My code:</p>
  <pre><code>import math
  
  delta_x = 0.001
  
  def integrate(func, z, w):
    return func(z, w)
  
  def f(x):
    return math.sin(x)
  
  i = integrate(f, 0, 1)
  print(&quot;{:.3f}&quot;.format(i))
  
  #Error: f() takes 1 positional arguments but 2 were given
  </code></pre>