Answer:
The following are the program in the Python Programming Language
#declare a variable and initialize to 'lo'
i=lo
#declare a variable and initialize to '0'
result=0
#set a while loop that iterates from 'hi' to 'lo'
while(i<=hi):
#Then, add i with result and store it in result.
result=result+i
#increament in the variable 'i' by 1
i+=1
Step-by-step explanation:
The following are the description of the program.
- Firstly, set the two variables that are 'i' and 'result', then, initialize in these variables to the variable 'lo' and '0'.
- Set the while loop statement that iterates from the variable 'i' and stops at the variable 'hi'.
- Finally, perform the addition with the variables 'result' and 'i' and store them in the variable 'result'. Then, increment in the variable 'i' by 1.