Created
November 27, 2016 01:45
-
-
Save AndreUltrasi/0a593d0f393b19ca876e6d80b684c6d0 to your computer and use it in GitHub Desktop.
série sum k1=1 1/k**4=pi**2/6 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
#Real | |
#1.6449340668482264 | |
#by python when m = 10**6 | |
#1.6449330668487701 | |
pi=3.14159265358979323846264338327950288419716939937510582097494459230781 | |
k = 1 | |
#m = infinity | |
#1/k**4=pi**2/6 | |
m=1000 | |
tmp=1/k**2 | |
print("k = ",k) | |
print("sum = ", tmp) | |
while k <= m: | |
print("k = ",k) | |
print("sum = ", tmp) | |
k+=1 | |
tmp+=1/k**2 | |
print("pi**2/6 = ", pi**2/6) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment