CH5 - If Statements Flashcards
What is Python’s If statement?
Examines the current state of a program and respond appropriately to that state,
What is Python’s conditional test?
Uses value True or False to determine to execute the code.
What is (==)?
Checks the equal value of data.
What is (!=)?
Checks the unequal value of data.
What is (
Mathematical comparison, Less than.
What is (<=)?
Mathematical comparison, Less than or equal.
What is (>)?
Mathematical comparison, Greater than.
What is (>=)?
Mathematical comparison, Greater than or equal.
What is the (and) condition?
Checks multiple conditions. Both conditions need to be true simultaneously.
What is the (or) condition?
Checks multiple conditions. either or Both conditions need to be true.
How to check a value in the list?
Use the (in) condition.
How to check the value is not in the list?
Use the (not) condition.
What is a Boolean value?
Is either true or false.
What is the (else) block?
Is a catch-all statement.