Module 06 - Conditonals Flashcards
What is a boolean expression?
Math operation that executes to only two answers: TRUE or FALSE
What do you use to calculate an exponent?
*
What do you use to calculate the remainder after division?
%
What is abs()?
Returns the positive value of a number
What is max()?
The highest integer value in a set of data
What is min()?
The lowest integer value in a set of data
What is int()?
A function or operation that converts a value to an integer
(EX: print(int[false, true, 10.3, 9.8])); // 0, 1, 10, 9)
Will a conditional statement not happen if it’s false?
True
What is a conditional statement?
It directs the flow of your program after checking the result of a boolean expression
What is a IF statement?
IF code block is something you do/execute if a condition is TRUE
What is boolean?
TRUE or FALSE
What are relational operators?
Used to compare values and determine the relationship between them
What is >?
Greater than
What is <?
Less than
What is ===?
Is it equal to
What is >=?
Greater than or equal to
What is <=?
Less than or equal to
What is !==?
Is the number not equal to
What is an ELSE statement?
Else block is executed only when the IF condition is FALSE
Where does the ELSE block go in a conditional expression?
At the very end of the expression
What is ELSE IF?
Executed if a boolean expression is FALSE and another boolean expression is TRUE
When you combine two boolean values w/ && the result is true. What is it?
AND
When you combine two boolean values w/||, the result is true when both operands (value/variables) are true & false otherwise. What is it?
OR
What is NOT (!)?
If the expression is originally true, applying ‘!’ makes it false, and if the expression is originally false, applying ‘!’ makes it true