TDT4109/Exercise 8 - Inspera/16.py

5 lines
127 B
Python
Raw Normal View History

2020-10-27 21:01:01 +01:00
def derivate(x, function):
h = 1e-8
return (function(x+h) - function(x)) / h
print(derivate(3, lambda x: x**2 + 2*x + 13))