Python Tutorial: Calculating a running total

preview_player
Показать описание
In this video, we talk about how to write programs that calculate a running total. There are many ways to accomplish this, but all of them involve at least two things: an accumulator variable, and a loop.

We start with a brief discussion of the topic, then map out the logic using flow charting, and finish off with multiple programming examples.
Рекомендации по теме
Комментарии
Автор

Thanks so much I was having trouble figuring out how to make a loop like this.

citizen
Автор

Thank you dude. This helped me in a college course. Had the frickin total in the for loop.

masonp
Автор

If you see this, and have the time or whatever.
Could you show or help me with a method to get rid of the 'Want to add another number?'
I'd like to have that removed, but still be able to add a number in the loop, but just have to type 'done' to end it or to restart the loop fresh

celicablues
Автор

Is the total variable in line one considered the sentinel?

madisonversfeld
welcome to shbcf.ru