You are on page 1of 2

Summary of operators | 1.2 Extending the Calculator: Types, Names, Str...

1 de 2

https://courses.edx.org/courses/course-v1:UC3Mx+IT.1.1x+3T2015/cou...

Addition operator - Adds operands on both sides of the operator

Subtraction operator - Subtracts the right hand operand from the left hand operand

Multiplication operator - Multiplies operands on both sides of the operator

Division operator - Divides the left hand operand by the right hand operand

Modulus operator - Divides the left hand operand by the right hand operand and returns
remainder

++

Increment operator - Increases the value of operand by 1

--

Decrement operator - Decreases the value of operand by 1

==

Checks if the values of the two operands are equal or not, if yes then the condition becomes
true.

!=

Checks if the values of the two operands are equal or not, if values are not equal then the
condition becomes true

>

Checks if the value of the left operand is greater than the value of the right operand, if yes
then the condition becomes true.

<

Checks if the value of the left operand is less than the value of the right operand, if yes then
the condition becomes true.

>=

Checks if the value of the left operand is greater than or equal to the value of the right
operand, if yes then the condition becomes true.

<=

Checks if the value of the left operand is less than or equal to the value of the right operand,
if yes then the condition becomes true.

&&

AND Operator. If both boolean operands are true, the condition becomes true

27/12/2015 10:03 p.m.

Summary of operators | 1.2 Extending the Calculator: Types, Names, Str...

2 de 2

https://courses.edx.org/courses/course-v1:UC3Mx+IT.1.1x+3T2015/cou...

||

OR Operator. If any of the boolean operands is true, the condition becomes true

NOT Operator. Reverses the value of a boolean operand

Simple assignment operator. It assigns values from right side operands to left side operand

27/12/2015 10:03 p.m.

You might also like