CSA 2.6-2.9 Vocab

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/9

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

10 Terms

1
New cards

De Morgan's Law

Can be applied to Boolean expressions to create equivalent ones:

!(a && b) is equivalent to !a || !b

!(a || b) is equivalent to !a && !b

2
New cards

Negation

A negated expression with a relational operator can be simplified by flipping the relational operator to its opposite sign.

!(c == d) is equivalent to c != d

!(c != d) is equivalent to c == d

!(c < d) is equivalent to c >= d

!(c > d) is equivalent to c <= d

!(c <= d) is equivalent to c > d

!(c >= d) is equivalent to c < d

3
New cards

Aliases

When two object references reference the same object

4
New cards

While Loop

A type of iterative statement. The Boolean expression is evaluated before each iteration of the loop body, including the first. When the expression evaluates to true, the loop body is executed. This continues until the Boolean expression evaluates to false, whereupon the iteration terminates.

5
New cards

Loop Control Variable

Used in the boolean condition of the loop

6
New cards

Infinite Loop

occurs when the Boolean expression in an iterative statement always evaluates to true

7
New cards

Off by One Error

occur when the iteration statement loops one time too many or one time too few

8
New cards

Input Controlled Loops

Use a sentinel value that is input by the user like “bye” or -1 as the condition for the loop to stop

9
New cards

For Loop

Type of iterative statement. There are three parts: the initialization (of the loop control variable or counter), the Boolean expression (testing the loop variable), and the update (to change the loop variable).

10
New cards

Accumulator Pattern

An algorithm that involves storing and updating an accumulator value within a loop, for example to compute a sum or average of a set of values.