def f(x): return(4/(1+x**2)) def rectangles(n): h=1/n U=0 V=0 for k in range(1,n+1): U=... V=... return(U,V)