Created
November 28, 2015 10:35
-
-
Save ozgurkaracam/d8ea49b9b9d939ede71c to your computer and use it in GitHub Desktop.
polinom toplamları
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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