摘要: 用莱布尼茨公式求圆周率π 莱布尼茨公式:π/4=1-1/3+1/5-1/7+1/9-1/11+…… python代码: pi=1 num=1 for times in range(10000): num=num+2 pi=pi-1/num num=num+2 pi=pi+1/num print("{ 阅读全文
posted @ 2023-10-30 22:05 hhhh44 阅读(1693) 评论(0) 推荐(0)