1/8
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What are the three types of loops in programming?
for, while, do while
What is a loop?
A repeated section of code
What is an iteration in the context of loops?
The amount of time a loop runs
What is a breakout condition?
An expression that ends a loop
What are the parts of a while loop?
The 'while' command, a condition, and a body (the block of code that repeats)
When do you use a while loop?
when condition is true.
When do you use a do while loop?
To execute your body before checking your condition.
When do you use a for loop?
When the iteration is known.
What makes a while loop useful?
repeats tasks automatically without needing to rerun the code each time.