Skip to content

Instantly share code, notes, and snippets.

@AndreUltrasi
Created November 27, 2016 01:40
Show Gist options
  • Save AndreUltrasi/5192b54590e485fccf52d3a19ce2479d to your computer and use it in GitHub Desktop.
Save AndreUltrasi/5192b54590e485fccf52d3a19ce2479d to your computer and use it in GitHub Desktop.
série 1=1÷2+1÷4.... em python
#1=1/2+1/4+1/8....
x=0
y=1
while y!=56:
x+=1/(2**y)
print ("y =",y)
print(x)
y+=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment