Relational Operators & Selection Structures Flashcards
What is an operand?
The variable in a line of code.
Example: test = x + y (x and y are the operand)
What is an operator?
Describes what action is going to be peformed.
Example: test = x + y ( = and + are operators)
What do operands in a comparison need to be?
They need to be of the same data type. Numeric to Numeric or Strings to Strings
What is a Boolean
A Boolean value is either True or False
Example:
x = True
y = False
Equivalency Operator
”=” evaluates a operands as equal. Usually seen as “ = = “ to avoid confusion with assignment operator.
What is a selection structure?
Used to make a decision or comparison, then decides what path.
Typically deciding whether the statement is true of false.
Compound condition
Where you need to ask multiple questions in a selection structure.