WEEK 1 Flashcards
IT IS USE TO COMPARE TWO VALUES
RELATIONAL OPERATORS
GIVE 6 KINDS OF RELATIONAL OPERATORS
> , >=, <, <=, ==, !=
IT MODIFIES THE CURRENT VALUE OF A VARIABLE BY PERFORMING AN OPERATION ON IT
COMPOUND ASSIGNMENT
GIVE ATLEAST 5 OPERATORS OF COMPOUND ASSIGNMENT
+=, -=, *=, /=, %=, «=, &=, ^=, |=,»_space;=
When you use a relational operator, the result of the comparison is either _______ or ______.
TRUE OR FALSE
They are equivalent to assigning the result of an operation to the first operand
COMPOUND ASSIGNMENT
These operators are commonly used in conditional statements like if, while, and for loops to control the flow of the program.
RELATIONAL OPERATORS
What does “op1 != op2” means?
op1 and op2 are not equal
What does “op1 >= op2” means?
op1 is greater than or equal than op2
What does “op1 > op2” means?
op1 is greater than op2
What does “op1 < op2” means?
op1 is less than op2
x = 5
y = 10
“x += y” ?
15
x = 5
y = 10
“x -= y” ?
-5