Solved Task 2.1

This commit is contained in:
schrom01 2022-09-24 20:20:39 +02:00
parent 5b0463467e
commit 3f874ab8b3
1 changed files with 0 additions and 2 deletions

View File

@ -15,11 +15,9 @@ def showPlot(xmin, xmax, xsteps):
plt.show() plt.show()
def polynom_function(coefficients, x): def polynom_function(coefficients, x):
n = len(coefficients) - 1
result = 0 result = 0
for power, coefficient in enumerate(coefficients): for power, coefficient in enumerate(coefficients):
result += coefficient * x ** power result += coefficient * x ** power
power += 1
return result return result
def plot_polynom_function(coefficients, xmin, xmax, xsteps): def plot_polynom_function(coefficients, xmin, xmax, xsteps):