Skip to content

Instantly share code, notes, and snippets.

@ozgurkaracam
Created November 21, 2015 19:11
Show Gist options
  • Select an option

  • Save ozgurkaracam/fc51a72070e6c7ecaefe to your computer and use it in GitHub Desktop.

Select an option

Save ozgurkaracam/fc51a72070e6c7ecaefe to your computer and use it in GitHub Desktop.
Ayrık matematik
def hesapla(nlist):
i=1
liste=[]
while i<len(nlist):
ort=(nlist[i]+nlist[i-1])/2
liste.append(ort)
i=i+1
if (len(nlist)==1):
return nlist
else:
return hesapla(liste)
print (hesapla([1,0,0,0,0,0,0,0,0]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment