a guest Feb 19th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- def computeDeriv(poly):
- Computes and returns the derivative of a polynomial function as a list of
- floats. If the derivative is 0, returns [0.0].
- poly: list of numbers, length > 0
- returns: list of numbers (floats)
- f = 0.0
- for i in range(len(poly)):
- f = float(poly[i] * i)
- if i >= 1:
- # f = (poly[i] * i)
- return L
RAW Paste Data