92.2k views
0 votes
Instructions

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.

Sample Run
99

197

294

390







4940

4944

4947

4949

4950

1 Answer

4 votes

total = 0

for x in range(99, 0, -1):

total += x

print(total)

I hope this helps!

User MilkyTech
by
4.1k points