Skip to content
Snippets Groups Projects
Commit 6dbf81e7 authored by Janne Lehtosalo's avatar Janne Lehtosalo
Browse files

Edit lagrange_polynomial.py

parent a85e63c1
No related branches found
No related tags found
No related merge requests found
...@@ -24,4 +24,5 @@ coefficient_calculator(inputs,outputs) ...@@ -24,4 +24,5 @@ coefficient_calculator(inputs,outputs)
polynomial = "" polynomial = ""
for z in range(0,len(polynomial_coefficients)): for z in range(0,len(polynomial_coefficients)):
polynomial += str(polynomial_coefficients[z]) + "*x^" + str(len(polynomial_coefficients)-z-1) + " " polynomial += str(polynomial_coefficients[z]) + "*x^" + str(len(polynomial_coefficients)-z-1) + " "
polynomial = polynomial[:-2]
print(polynomial) print(polynomial)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment