Boolean Logic Flashcards

1
Q

what are logical operators?

A

specific operators that are combined with one or more boolean expressions to create a single boolean output

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

What are the 3 logical operators?

A

! not
&& and
|| or

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

logical operator !

A

not

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

logical operator &&

A

and

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

logical operator ||

A

or

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

when short circuiting And (&&) what does the first expression need to be?

A

false, because is the first is false the whole expression will be false

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

when short circuiting Or (||) what does the first expression need to be?

A

true, because is the first is true the whole expression will be false

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

conditional statements are used….

A

are used to allow branching in our code

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

what is used to achieve multiple conditional branches?

A

else if

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

can there be multiple else statements?

A

no

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

what are nested conditional statements?

A

They are conditional statements that are inside other conditional statements.

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