Arithmetic Operators Flashcards
Simple Operators such as division, multiplication, addition, and subtraction
+
ADD
Adds the values on either side of the operator.
Ex: 10 + 20 = 30
-
SUBTRACT
Subtracts the right operand from the left operand.
Ex: 10 - 20 = -10
*
MULTIPLY
Multiplies values on either side of the operator
Ex: 10 * 20 = 200
/
DIVIDE
Divides the left operand by the right operand.
Ex: 20 / 10 = 2
%
MODULO
Divides the left operand by the right operand and returns the remainder.
Ex: 20 % 10 = 0
**
EXPONENT
Preforms exponential calculation on operators
Ex: 5 ** 2 = 25
//
FLOOR DIVISION
The division of operands where the result is the quotient in which the digits after the decimal point are removed. But if one of the operands is negative, the result is floored, I.E. rounded away from zero (towards negative infinity)
Ex: 9 // 2 = 4 9.0 // 2.0 = 4.0 -11 // 3 = -4 -11.0 // 3 = -4.0