COMPUTING
NERDS.COM
A PLACE TO LEARN PYTHON PROGRAMMING
3. ITERATION



Sometimes Iteration is called repetition or LOOPS. There are two main types of loops:

1. VARIABLE LOOPS (While)
2. FIXED LOOPS (For)

Loops allow a program to do things in a different order instead of just following a linear path. A while loop could be used like this. WHILE fire button is pressed, fire the weapon. A for loop could be used like this. FOR weapon in weapons print weapon. This will give you a list of the weapons you own.