Chapter 6: Loops and Course Standards

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/16

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering looping constructs, evaluation rules, and course programming standards from Chapter 6.

17 Terms

1
New cards

Iteration

One execution of all statements found inside the body of a loop.

2
New cards

Loop control expression

The condition that determines whether the task to repeat is finished.

3
New cards

Pretest loop

A loop in which the control expression is evaluated before each iteration, including the first iteration, and where the initialization of the loop control variable must take place outside the body.

4
New cards

Post-test loop

A loop in which the minimum number of times that the statements found inside of the loop are executed is one.

5
New cards

Loop update

The action that is responsible for changing the result of the loop control expression from true to false.

6
New cards

Loop control variable

A variable that is commonly a part of the loop control expression and the recipient of the loop update action.

7
New cards

Event-controlled loop

A loop where we do not know the number of times that the actions found inside the body of the loop will be executed.

8
New cards

Counter-controlled loop

A loop that may execute a constant number of iterations or iterate a number of times that depends on the value of a single variable or expression.

9
New cards

Pretest loop evaluation count

The number of times that the loop control expression is evaluated, which is one more than the number of iterations.

10
New cards

while loop

A looping construct that requires the use of parentheses around the loop control expression.

11
New cards

do-while loop

A looping construct that terminates with a semicolon after its loop control expression.

12
New cards

Braces { and } (Course Standard)

Syntactic construct that is required by course standards to always be used with all looping constructs, similar to their required use in the if construct.

13
New cards

Main function control structures (Course Standard)

Permissible only in a limited amount in the main function to ensure that it makes most of the function calls for a program.

14
New cards

Input validation

An example of an event-controlled problem for which selection by itself is insufficient because it provides only a finite number of opportunities for the user to input valid data.

15
New cards

Input validation scope (Course Standard)

The requirement to validate for the input of both the range of acceptable values and the correct data type, commonly expected to be found in the same function containing the prompt for input and scanf statement.

16
New cards

Short-circuit evaluation in loops

A method of evaluating logical expressions that does apply to loop control expressions.

17
New cards

Control-forcing statements (Course Standard)

Statements such as break, continue, exit, and the use of multiple return statements in a user-defined function, which are prohibited by course standards as mechanisms to terminate repetitive processes.