M03 - Repetition Statements Flashcards
1
Q
Condition-controlled Loop
A
- while loop
- Uses true or false condition to control the number of times that it repeats
2
Q
Count-controlled loop
A
- for loop
- repeats a specific number of times depending on the conditions
3
Q
2 parts of While loops
A
- Condition that is tested for a true or false value
2. A statement(s) that are repeated as long as the condition is true
4
Q
while syntax
A
variable = value
while variable condition :
(tab) print(variable)
(tab) variable = variable + 1 (increment of +1)