Boolean Logic Flashcards
what are logical operators?
specific operators that are combined with one or more boolean expressions to create a single boolean output
What are the 3 logical operators?
! not
&& and
|| or
logical operator !
not
logical operator &&
and
logical operator ||
or
when short circuiting And (&&) what does the first expression need to be?
false, because is the first is false the whole expression will be false
when short circuiting Or (||) what does the first expression need to be?
true, because is the first is true the whole expression will be false
conditional statements are used….
are used to allow branching in our code
what is used to achieve multiple conditional branches?
else if
can there be multiple else statements?
no
what are nested conditional statements?
They are conditional statements that are inside other conditional statements.