import math def f(x): return math.sqrt(1-x*x) def aria(a,b,N): dx=(b-a)/N sum,x=0,a for i in range(N): sum+=f(x) x+=dx return dx*sum print(aria(-1,1,100)) print(math.pi/2)