Question #138713

Write a program that will add up the series of numbers: 99, 98, 97… 3, 2, 1. The program should print the running total as well as the total at the end. The program should use one for loop, the range() function and one print() command.

Expert's answer

total = 0
for i in range(99,0,-1):
    total += i
    print("running total:",total)


print("total: ",total)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS