Chapter 54 - Selection Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is sequence?

A

» Executing instructions one after another

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

What is assignment?

A

» A value is assigned to a variable

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

What is another name for selection?

A

» Branching

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

What is selection?

A

» Branching is where a decision as to which part of the program is to be run is made - based on the state of a Boolean expression

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

What does > mean?

A

» Greater than

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

What does < mean?

A

» Less than

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

What does <= mean?

A

» Less than or equal

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

What does >= mean?

A

» Greater than or equal to

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

What does != mean?

A

» Not equal

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

What are the features of if/else statements?

A

» Present a Boolean condition and a block of code that is run if the condition is true

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

When is switch/case statements useful?

A

» When a choice has to be made between several alternatives

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

How can you start of a switch/case statement?

A

» switch x:
case “what ever the case is” :
case “etc..” :

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

What is the defauly statement in a swich/case statement?

A

» It runs if none of the cases is true, same as else

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

What does BRA mean?

A

» Branch always

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

What dose BRP mean?

A

» Branch if the value in the accumulator is positive

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

What is the order in which boolean operators are executed in?

A

» NOT
» AND
» OR

17
Q

What does XOR stand for?

A

» Exclusive OR
» Which means either a or b but not both