Structures Flashcards

1
Q

What are the Boolean operators

A

Not
And
Or

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is NOT’s function

A

NOT is a unary operator, it is applied to only one value and inverts it:
-not true = false
-not false = true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is AND’s function

A

AND yields TRUE only if both values are TRUE
-false AND false = false
-false AND true = false
-true AND false = false
-true AND true = true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is OR’s function?

A

OR yields TRUE if at least one value is TRUE
-true OR true = true
-true OR false = true
-false OR true = true
-false OR false = false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the 2 types of loops?

A

Pre test loop
Post test loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the 2 types of Pre Test Loops and Post Test Loops?

A

Counter
Sentinel

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

When are Counters and Accumulators used?

A

Counters and Accumulators are used within a repetition structure to calculate totals, subtotals, and averages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What must be done to all Counters and Accumulators?

A

All Counters and Accumulators must be Initialized and Updated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is Initializing?

A

Initializing is assigning a beginning value to a variable
(typically, but not always, 0)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

When is initialization usually performed and why?

A

Initialization is usually performed outside the loop body, and this is because it only needs to be done once

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is Updating?

A

Updating is adding a number to the value stored in a variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are Counters updated by?

A

Counters are updated by a Constant Value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are Accumulators updated by?

A

Accumulators are updated by an amount that varies

How well did you know this?
1
Not at all
2
3
4
5
Perfectly