Skip to content
Snippets Groups Projects
Commit ef565b96 authored by gawen.ackerman's avatar gawen.ackerman :robot:
Browse files

Merge branch 'main' of https://gitedu.hesge.ch/florian.burgener/math-tp-001 into main

parents 86a9c72e b36e00f4
No related branches found
No related tags found
No related merge requests found
...@@ -17,8 +17,12 @@ class Polynomial: ...@@ -17,8 +17,12 @@ class Polynomial:
self.value = value self.value = value
def pass_x_throughout(self, x): def pass_x_throughout(self, x):
pass a = list(self.value)
sum = (a[len(a)-1]*x)+a[len(a)-2]
for i in reversed(range(len(a)-2)):
sum = sum*x+a[i]
return sum
def __add__(self, other): def __add__(self, other):
a = list(self.value) a = list(self.value)
b = list(other.value) b = list(other.value)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment