如题所述
mypi = 0for i in range(1,10**8+1,2): if i % 4 == 1: mypi += 1/i else: mypi -= 1/imypi *= 4print(mypi)
程序缩进如图所示