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.
1
Expert's answer
2020-10-16T13:11:40-0400
total = 0
for i in range(99,0,-1):
total += i
print("running total:",total)
print("total: ",total)
Comments
Leave a comment