Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
7 Cards in this Set
- Front
- Back
while statement |
Same as English meaning. n = 5 “While n |
|
loop |
When the code looks back around to the to. Each time we execute the body of the loop, we call it an iteration. |
|
iteration variable |
The variable that changes each time the loop executes and controls when the loop finishes. Without the iteration variable you will have a infinite loop. |
|
continue statement |
You can use the continue statement to skip to the next iteration without finishing the body of the loop for the current iteration. Returns back to top of loop. |
|
while vs for |
While statement is indefinite loop because it simply loops until some condition becomes False. The for loop is looping through a known set of items so it runs through as many iterations as there are items in the set. Often used for list of things to loop through. |
|
loops are generally constructed by: |
• Initializing one or more variables before the loop starts. |
|
break statement |
Used to jump out of a loop. |