# Iteration

Studied by 119 people
5.0(2)
get a hint
hint

Loop

1 / 14

## Tags and Description

### 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
Studied by 13 people
Updated ... ago
5.0 Stars(1)
Note
Studied by 12 people
Updated ... ago
5.0 Stars(1)
Note
Studied by 17 people
Updated ... ago
5.0 Stars(2)
Note
Studied by 7 people
Updated ... ago
4.0 Stars(1)
Note
Studied by 24 people
Updated ... ago
5.0 Stars(1)
Note
Studied by 2 people
Updated ... ago
5.0 Stars(1)
Note
Studied by 7 people
Updated ... ago
5.0 Stars(1)
Note
Studied by 184 people
Updated ... ago
5.0 Stars(2)

## Explore top flashcards

Flashcard86 terms
Studied by 27 people
Updated ... ago
5.0 Stars(1)
Flashcard122 terms
Studied by 25 people
Updated ... ago
5.0 Stars(2)
Flashcard20 terms
Studied by 34 people
Updated ... ago
5.0 Stars(4)
Flashcard78 terms
Studied by 3 people
Updated ... ago
5.0 Stars(1)
Flashcard22 terms
Studied by 74 people
Updated ... ago
5.0 Stars(1)
Flashcard45 terms
Studied by 8 people
Updated ... ago
5.0 Stars(1)
Flashcard49 terms
Studied by 25 people
Updated ... ago
5.0 Stars(1)
Flashcard90 terms
Studied by 8024 people
Updated ... ago
4.4 Stars(62)