Sum of Evens
Easy · 30 XPPrint the sum of all even numbers from 1 to 100 inclusive.
Target output
2550
Blank · autosaved
PYsum-of-evens.py
sum(range(2, 101, 2)) — or a loop with i % 2 == 0.
print(sum(range(2, 101, 2)))
Run your code to check it…