Exerpad
🔥0
0 XP
Lv.1 Beginner
Log In

Fix the Accumulator

This program should compute the sum of 1+2+3+4+5, but it starts wrong. Fix it!

Expected output:

text
15

💡 Hints

?Hint 1
🔒Hint 2
🔒Hint 3
python
total = 1
i = 1
while i <= 5:
total = total + i
i = i + 1
print(total)