Arithmetic, Relational/comparison,Logical/Boolean Operators Flashcards
What operator is being used below and what is its function? 7 + 2 = 9
(+)
Function: Addition.
It is an Arithmetic operator.
What operator is being used below and what is its function?
7 - 2 = 5
(-)
Function: Subtraction
It is an Arithmetic operator.
What does BIDMAS stand for?
Brackets, Indices, Division, Multiplication, Addition, Subtraction
What operator is being used and what is its function?
7 * 2 = 14
(*)
Function: Multiplication
It is an Arithmetic operator.
What operator is being used and what is its function?
7/2 = 3.5
(/)
Function: Division
It is an Arithmetic operator.
What operator is being used and what is its function?
3**3 = 27
(**)
Function: Exponent
It is an Arithmetic operator (surprise!)
What will happen when a DIV operator is run?
The quotient will return as a result.
What will happen when a MOD operator is run?
The remainder will return as a result.
27 MOD 13
Result = 1
24 DIV 3
Result = 8
What is this operator: <
Less than
What is this operator: >
Greater than
What is this operator: <=
Less than or equal to
What is this operator: >=
Greater than or equal to
What is this operator: ==
Equal to
What is this operator: !=
Not equal to
True or False
10 <= 10
True
Which operator evaluates to True when all of the relational expressions evaluate to True?
AND
Which operator evaluates to True when either or both of the relational expressions evaluate to True?
OR
Which operator evaluates to True when the relational expression evaluates to False?
NOT
Which operator evaluates to False when both relational expressions evaluate to True or both relational expressions evaluate to False?
XOR
What result will be printed after the following is evaluated?
7 + 2(12 - 3(2^2))^2
Result = 7