pi = 0N = 100for k in range(N): pi += 1/pow(16, k) * (4 / (8 * k + 1) - 2 /(8 * k + 4) - 1/(8 * k + 5) - 1 /(8 * k + 6)) print("圆周率值是:{}".format(pi))
posted on 2021-10-16 08:56 这爷们真的丑 阅读(220) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 这爷们真的丑 Powered by .NET 9.0 on Kubernetes