Unit_6_Part_2_While and do-While loops

studied byStudied by 0 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 9

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

10 Terms

1
do Statement
A statement that executes a block of code once and then repeats based on a condition.
New cards
2
do loop
A loop that ensures the body is executed at least once before the condition is checked.
New cards
3
for loop
A loop that consists of initialization, condition evaluation, and increment; executes a block of code multiple times.
New cards
4
syntax of a do statement
do { statement-list; } while (condition); The statement-list is executed once, then repeats until the condition is false.
New cards
5
conditional statement
A programming statement that executes based on a specified boolean condition.
New cards
6
initialization in a for loop
The part of a for loop where variables are initialized before execution.
New cards
7
increment in a for loop
The operation that updates the looping variable after each iteration.
New cards
8
infinite loop
A loop that never terminates because the condition for exiting is never met.
New cards
9
for-each loop
A loop designed to iterate over elements in a collection without explicitly managing the iterator.
New cards
10
while loop vs do loop
A while loop checks the condition before executing the body, while a do loop executes the body once before checking the condition.
New cards
robot