Control Flow

Conditions, for and while loops, loop control, the loop else clause and pattern programming.

5 notes

Notes

Python

The for Loop and range()

A Python for loop walks over the items of a collection directly. range() supplies numbers when you genuinely need a counter, which is less often than...

Read more
Python

The while Loop

while repeats for as long as a condition holds. Use it when the number of repetitions is unknown, and make sure something inside the loop can make the...

Read more