🔥
0
0 XP
Lv.1 Beginner
Log In
Home
/
Python
/
Getting Started
/
While Loops
/
Fix The Accumulator
/
Exercise
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
Reveal (-5 XP)
🔒
Hint 2
🔒
Hint 3
python
Reset
9
1
2
3
4
5
6
total
=
1
i
=
1
while
i
<=
5
:
total
=
total
+
i
i
=
i
+
1
print
(
total
)
▶ Run
Visualize
✓ Submit
← Powers of Two
Digit Counter →