Unit 3: Boolean Expressions and If Statements Flashcards
If just two conditions on an if statement, it will be ___.
If more, it will be ___.
if, else
if, else if, else
way to represent and in boolean expressions:
way to represent or in boolean expressions:
way to represent not equal in boolean expressions:
&&
||
!, !=
if there’s an and expression, and the first case is false, ___.
if there’s an or expression, and the first case is true, ___.
then the second case won’t be looked at and it’s false.
then the second case won’t be looked at and it’s true
(even if the second thing would cause an error it will not be looked at and compile)
!(a && b) is also:
!(a II b) is also:
!a II !b
!a && !b
!(c < d) is equivalent to:
!(c > d) is equivalent to:
!(c <= d) is equivalent to:
!(c >= d) is equivalent to:
c >= d
c <= d
c > d
c < d
!(c == d) is equivalent to:
!(c != d) is equivalent to:
c != d
c == d