383 views
0 votes
consider l= 5 ,r= 11. you must determine the sum of the values of the function in the range L to R . you have to calculate sum = lrf(x) in python coding

1 Answer

3 votes

def summation (num1, num2):

i = 0

for x in range (num1 : num2 + 1):

i += x

return i

print ( summation(l, r))

User Ravid
by
4.9k points