Project Description
Your task for today is to write a Python program that calculates the sum of all numbers from 1 to 100.
You should use a loop to go through the numbers and add them up. Store the result in a variable and print it at the end.
Expected Output
The program should print the total sum of the numbers from 1 to 100:
5050
💡 Hint
Don’t know where to start? This hint will show you how to begin.
𝌣 Solution
🔒 This solution is available to paid subscribers only.
🚀 Want to keep leveling up?
Browse 200+ projects at dailypythonprojects.substack.com/archive and unlock all solutions by subscribing. Build real Python skills daily and transform how you learn — one project at a time.
# My solution:
def sum_numbers():
sum = 0
for i in range (0,101):
sum += i
print(sum) # Output: 5050
sum_numbers()
sum_ = 0
for i in range(1,101):
sum_+=i
print(sum_)