from math import log
def f(x):
return (log(x))
def rect(n,a,b):
s=0
S=0
h=(b-a)/n
for k in range(n):
s=s+f(a+k*h)*h
S=S+f(a+(k+1)*h)*h
return (s,"< I <",S)
print (rect(100,2,7))
To embed this project on your website, copy the following code and paste it into your website's HTML: