定义一个函数PI(e),e是一个表示精度的小数,函数返回π的近似值
没规定算法吗那可太简单了
import math def PI(e): s=int(1/e)-1 l=len(str(s)) return round(math.pi,l) print(PI(0.00001))