Iteration

studied byStudied by 182 people
5.0(3)
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 / 14

15 Terms

1

Loop

A programming construct that allows a set of statements to be repeated multiple times as long as a certain condition is true.

New cards
2

While Loop

A type of loop that continues to cycle through as long as a specified condition is true.

New cards
3

Infinite Loop

A loop that continues indefinitely because the condition to exit the loop is never met.

New cards
4

For Loop

A type of loop that allows for more structured looping by specifying an initialization, condition, and incrementation of a variable.

New cards
5

Initializer

The first step in a for loop where a variable is initialized to a certain value.

New cards
6

Condition

The second step in a for loop where a condition is checked to determine if the loop should continue executing.

New cards
7

Statements

The third step in a for loop where a set of statements is executed as long as the condition is true.

New cards
8

Incrementer

The fourth step in a for loop where the value of the variable is incremented or changed.

New cards
9

Code for a for loop

for(/*initializer*/; /*condition*/; /*incrementor*/)
{
/*statements*/
}

//Note that all comments above would be filled with code acting as the specified task.
New cards
10

Code for a while loop

while(/*condition*/)
{
/*statements*/
}

//Note that all comments above would be filled with code acting as the specified task.
New cards
11

Where in a for-loop would code such as "i++” go?

Incrementor

New cards
12

Where in a for-loop would code such as "int i = 0” go?

Initializer

New cards
13

Where in a for-loop would code such as "i < 10” go?

Condition

New cards
14

Where in a while-loop would code such as "i < 10” go?

Condition

New cards
15

Where in a while-loop would code such as "i++” go?

Statements

New cards

Explore top notes

note Note
studied byStudied by 13 people
889 days ago
5.0(1)
note Note
studied byStudied by 129 people
924 days ago
4.5(2)
note Note
studied byStudied by 62 people
655 days ago
5.0(2)
note Note
studied byStudied by 6 people
840 days ago
5.0(1)
note Note
studied byStudied by 27 people
917 days ago
4.5(2)
note Note
studied byStudied by 55 people
655 days ago
5.0(2)
note Note
studied byStudied by 131 people
830 days ago
5.0(3)
note Note
studied byStudied by 8907 people
656 days ago
4.8(41)

Explore top flashcards

flashcards Flashcard (22)
studied byStudied by 145 people
282 days ago
5.0(1)
flashcards Flashcard (45)
studied byStudied by 2 people
735 days ago
5.0(1)
flashcards Flashcard (35)
studied byStudied by 5 people
791 days ago
5.0(1)
flashcards Flashcard (42)
studied byStudied by 54 people
123 days ago
5.0(1)
flashcards Flashcard (34)
studied byStudied by 8 people
678 days ago
5.0(1)
flashcards Flashcard (40)
studied byStudied by 44 people
321 days ago
4.5(2)
flashcards Flashcard (22)
studied byStudied by 18 people
67 days ago
5.0(1)
flashcards Flashcard (27)
studied byStudied by 1 person
680 days ago
5.0(1)
robot