Skip to content

Instantly share code, notes, and snippets.

@ozgurkaracam
Created November 28, 2015 10:35
Show Gist options
  • Save ozgurkaracam/d8ea49b9b9d939ede71c to your computer and use it in GitHub Desktop.
Save ozgurkaracam/d8ea49b9b9d939ede71c to your computer and use it in GitHub Desktop.
polinom toplamları
def pt(a,b):
i=0
yenidizi=[]
while i<len(a) and i<len(b):
yenidizi.append(a.pop(i)+b.pop(i))
if len(a)>0:
yenidizi.append(a.pop(i))
elif len(b)>0:
yenidizi.append(b.pop(i))
return yenidizi
print (pt([3,4,1],[2,1,8]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment