Answer:
result = 0
i = lo
while i <= hi:
result = result + i
i += 1
Step-by-step explanation:
Initialize the result as 0 to hold the summation value.
Since we are asked not to change the value of lo and hi, our loop control variable is i and initially it starts from lo.
Since we are asked to add the number from lo to hi, while loop condition checks it.
While the condition satisfies (during each iteration), the value of i is added to the result and the value of i is incremented by one.