For7. Two integers A and B (A < B) are given. Find the sum of all integers from A to B including.
Solution in Python 3:
import random
A = random.randrange(10)
n = random.randrange(10)+1
B = A + n
print('A = ', A)
print('B = ', B)
S = 0
for i in range(A,B+1,1):
S += i
print(i," : ",S)
print("Sum = ",S)