Q2 L4 A - Operators and Expressions Flashcards
These are symbols that indicate the operation to be performed.
Operators
Main classifications of operators?
- Arithmetic Operators
- Relational Operators
- Logical Operators
These are used to perform mathematical calculations.
Arithmetic Operators
How many (given by ma’am) Arithmetic operators are there?
Seven
Symbol of multiplication
- (Asterisk)
Symbol of Division
/
Symbol of Addition
+
Symbol of Subtraction
-
Symbol of Exponentiation
Symbol of Modulo Division
MOD
Symbol of Integer Division
\
What to do in modulo division?
Only take the REMAINDER as the answer.
What to do in integer division?
Only take the WHOLE NUMBER as the answer.
An expression is a combination of one or more… (continue the statement)
One or more constants, variables, functions, and operators that the programming language interprets and computes to produce another value.
A syntactic entity in a programming language that may be evaluated to determine its value.
Expression
the acronym / arithmetic hierarchy of computation
PEMDAS
They are used to compare two values base on certain condition.
Relational Operators
List of Relational Operators
- > greater than
- < less than
- = equal to
- <> not equal to
- > = greater than or equal to
- <= less than or equal to
Operators that determine if a particular condition is satisfied
Logical Operators
Types of Logical Operators
A. AND
B. OR
C. NOT
What is the condition of AND operator?
The result is always true if and only if ALL CONDITIONS are TRUE.
What is the condition of OR operator?
Only needs at least ONE TRUE for the result to be TRUE.
What is the condition of NOT operator?
The result is always the OPPOSITE of the GIVEN condition.
A set of rules specifying which procedures should be performed
first in a mathematical expression.
Order of Precedence