MicrolearnENPTES

Accumulating

Lesson 11 of 20 · Py.Micro

Sum, count and find the best value while you loop.

Create the total before the loop, add inside it and use it after. Follow total in the step by step.

Check yourself

Where should total = 0 go?

Do it in the browser: a real Python tool, a short mission and instant feedback. No install.

Start this lesson — free
← while loopsbreak and continue →

All lessons · Py.Micro