# For Loops

**Channel:** MIT OpenCourseWare
**Source:** https://www.youtube.com/watch?v=mrvBnZIEsZY
**Transcript page:** https://www.withtranscript.ai/video/mrvBnZIEsZY

## Chapters

- 0:00 — Chapter 1 (0:00)

## Transcript

**[0:00]:** the following content is provided under a Creative Commons license your support will help MIT open courseware continue to offer highquality educational resources for free to make a donation or view additional materials from hundreds of MIT courses visit MIT opencourseware at

**[0:22]:** ocw.mit.edu so now we have this this last exercise I'm creating a my sum I'm going to go through all of these values and you guys have already told me what values these are 5 7 9 not 11 and I'm going to add to my sum so I'm going to keep a running sum adding all of these values together okay so the very first time through the loop my sum gets the value of five okay that's this line here the next thing I'm I see inside this Loop is an if statement if my sum is equal to five that's true so I'm going to go inside this if statement the next thing I see is a break if I see this break am I evaluating this am I evaluating this line or not no exactly because when whenever python sees break it's going to say I'm going to stop right here exit out of the loop

**[1:26]:** that I'm currently in and go to the statement that's immediately right after it so what this is going to print is my sum and that's the exercise we were looking at let's see how the class did pretty good hopefully if you answered one of these um the explanation was was all right if not just go back and try to work through it step by step
