Introduction To Operators
Introduction To Operators
Operators
Task Symbol
Subtraction -
● Symbols that represent mathematical or logical tasks.
Multiplication *
3+5 Division /
Operands Operator
Different Types of Operators
Operators
Arithmetic Operators
• Addition +
• Subtraction –
• Multiplication *
• Division /
• Modulo %
• Floor division //
• Exponent **
Different Types of Operators
Arithmetic Operators
Addition -> 3 + 5 + 6 = 14
• Addition +
Subtraction -> 6 - 4 - 2 = 0
• Subtraction –
• Multiplication *
• Division /
• Modulo %
• Floor division //
• Exponent **
Different Types of Operators
Arithmetic Operators
Addition -> 3 + 5 + 6 = 14
• Addition +
Subtraction -> 6 - 4 - 2 = 0
• Subtraction –
Multiplication -> 3 * 5 * 6 = 90
• Multiplication *
Division -> 5 / 3 = 1.67
• Division /
• Modulo %
• Floor division //
• Exponent **
Different Types of Operators
Arithmetic Operators
Addition -> 3 + 5 + 6 = 14
• Addition +
Subtraction -> 6 - 4 - 2 = 0
• Subtraction –
Multiplication -> 3 * 5 * 6 = 90
• Multiplication *
Division -> 5 / 3 = 1.67
• Division /
Modulo -> 5 % 3 =2
• Modulo %
Floor Division -> 5 // 3 =1
• Floor division //
• Exponent **
Different Types of Operators
Arithmetic Operators
Addition -> 3 + 5 + 6 = 14
• Addition +
Subtraction -> 6 - 4 - 2 = 0
• Subtraction –
Multiplication -> 3 * 5 * 6 = 90
• Multiplication *
Division -> 5 / 3 = 1.67
• Division /
Modulo -> 5 % 3 =2
• Modulo %
Floor Division -> 5 // 3 =1
• Floor division //
Exponent -> 5 ** 3 = 125
• Exponent **
Different Types of Operators
Comparison Operators
• Equal to ==
• Not equal to !=
Different Types of Operators
x y
Comparison Operators Less than -> x < y -> ? 3 5
• Equal to ==
• Not equal to !=
Different Types of Operators
x y
Comparison Operators Less than -> x < y -> True! 3 5
• Equal to ==
• Not equal to !=
Different Types of Operators
x y
Comparison Operators Less than -> x < y -> ? 17 5
• Equal to ==
• Not equal to !=
Different Types of Operators
x y
Comparison Operators Less than -> x < y -> False 17 5
• Equal to ==
• Not equal to !=
Different Types of Operators
x y
Comparison Operators Less than -> x < y 17 5
• Equal to ==
• Not equal to !=
Different Types of Operators
x y
Comparison Operators Less than -> x < y 17 5
• Equal to ==
Logical
Logical
Operators
Operator
• and
• or
• not
Different Types of Operators
Logical
Logical
Operators
Operator and -> True only if both comparisons are True.
• and
• or
• not
Different Types of Operators
x y
• or
• not
Different Types of Operators
x y
• or
• not
Different Types of Operators
x y
• or
• not
Different Types of Operators
x y
Arithmetic Operators
Comparison Operators
Logical
Logical
Operators
Operator
• Addition +
• Less than <
• Subtraction – • and
• Less than or Equal to <=
• Multiplication * • or
• Equal to ==
• Division / • not
• Greater than >
• Modulo %
• Greater than or equal to >=
• Floor division //
• Not equal to !=
• Exponent **
Thank You