When we break down a large task, often we will find that some portion of the task needs to be repeated many times.
As programmers, we would simply call the same function many times.
This might work if we need to call the same function five times, but if that function needs to be run 1,000,000 times, we’ll need a better solution.
Loop: a programming construct that repeats a group of commands
Iteration: “loop” by another name – the repetition of a statement, process, or procedure.
For Loop – A particular kind of looping construct provided in many languages. Typically, a for loop defines a counting variable that is checked and incremented on each iteration in order to loop a specific number of times.
Please complete Unit 3, Chapter 1, Unit 9, Activities 3-18 on code.Org
What is not completed in class is homework