Solved Task 2.1
This commit is contained in:
parent
5b0463467e
commit
3f874ab8b3
|
@ -15,11 +15,9 @@ def showPlot(xmin, xmax, xsteps):
|
|||
plt.show()
|
||||
|
||||
def polynom_function(coefficients, x):
|
||||
n = len(coefficients) - 1
|
||||
result = 0
|
||||
for power, coefficient in enumerate(coefficients):
|
||||
result += coefficient * x ** power
|
||||
power += 1
|
||||
return result
|
||||
|
||||
def plot_polynom_function(coefficients, xmin, xmax, xsteps):
|
||||
|
|
Loading…
Reference in New Issue