Created
November 27, 2016 01:40
-
-
Save AndreUltrasi/5192b54590e485fccf52d3a19ce2479d to your computer and use it in GitHub Desktop.
série 1=1÷2+1÷4.... em python
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
#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