How can you compute an integral and derivative in python of a polynomial and return a list with the coefficients? -
it should include loop believe don't know how more that.
def polyint(p,c = 0): sum = 0 in range(0,len(p),1): sum = sum + p[i+1] * (x**(i+1)) return p
print polyint([1,1,1])
i don't think correct integral best guess. beginner in coding don't have lot of intuition programming. help.
Comments
Post a Comment