#chuong trinh tinh so pi import time t1=time.time() p=0 i=0 n=6 sohang=(-1)**i/(2*i+1) while abs(sohang)>10**(-n): p += sohang i += 1 sohang = (-1)**i/(2*i+1) print(p*4) t2=time.time() print('Thoi gian thuc hien: {} s '.format(t2-t1))
https://tritue.edu.vn/tuecode/tracnghiem30/index.php/baiviet/post/view/id/225?id=225