<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Operators
We are now going to explore Operators. They are single or bi character symbols represent a specific type of operation, say addition, multiplication or comparision. 
Python provides many types of operators. We will explore them based on their functionality namely. 
Assignment Operators
Arithmetic Operators
Relational Operators
Logical/Boolean Operators
Bitwise Operators
Arithmetic Operators
Python supports all most common maths operations as shown in the below table
| Syntax    | Math  | Operation Name    |
|-------------- |-------------------------------------------    |------------------------------------------------------------------ |
| a + b   | a + b     | addition  |
| a - b   | a - b     | subtraction   |
| a * b   |  a * b   | multiplication    |
| a / b   |  a \div b  | division (see note below)    |
| a // b  |  a//b     | floor division (e.g. 5//2=2)  |
| a % b   |  a % b    | modulo    | 
| -a  | -a | negation     | 
| abs(a)| <code>&#124; a &#124;</code>  | absolute value    |
| ab  | ab  | exponent  |
| math.sqrt(a)  |  sqrt a   | square root   |
<center>Note</center>
In order to use math.sqrt() function, you must explicitly load the math module by adding import math at the top of your file, where all the other modules import's are defined.
We will explore the below operators with various primary data types  
Numeric Vs Numeric
Following mathemetical operations are supported in python between numeric data
Step1:  Numeric Vs String
Step2:  As shown above only "*" multiplication is possible between string & real numeric value
Complex Vs String
Step3:  Complex Vs Numeric
Step4:  Thus we can see that following operations are not possible with complex data type  floor (//), mod (%), compare (<, >, >=, <=).
Assignment Operators
| Syntax    | Math  | Operation Name |
|-------------- |-------------------------------------------|------------------------------------------------------------------ |
| +=  | a + b     | addition  |
| -=  | a - b     | subtraction   |
| *=  |  a * b   | multiplication    |
| /=  |  a \div b  | division (see note below)    |
| //=     |  a//b     | floor division (e.g. 5//2=2)  |
| %=  |  a % b    | modulo    | 
Numeric
Int
Step5:  Real Number
Step6:  Complex Number
Step7:  Boolean Number
Step8:  Relational Operators
Step9:  | Syntax    | Math   | Operation Name       |
|---------- |--------|----------------------|
| <         | a < b  | Less- than           | 
| >         | a > b  | Greater- than        |
| <=        | a <= b | Less- than- equal    |
| >=        | a >= b | Greater- than- equal |
| ==        | a == b | Equal to             | 
| !=        | a != b | not equal to         |
Numeric Vs Numeric
Step10:  Numeric Vs String
Step11:  Numeric Vs Complex
Step12:  Complex Vs Complex
Step13:  Complex Vs String
Step14:  String  Vs String
Step15:  Logical/Boolean Operators
| Syntax    | example        | Operation Name  | Meaning                                                   |
|---------- |----------------|---------------- |-----------------------------------------------------------|
| and     | a and b      | Logical AND     | returns true if and only if both expressions are true     |
| or      | a or b       | Logical OR      | returns true if and only if even an expressions are true  |
| not     | not(a and b) | Logical NOT     | returns reverse of the expression                         |
| is      | a is b       | Logical IS      | returns true both references are same object else false   |
| in      | in           | Logical IN      | returns true if first is found in second else false       |
Example
Step16:  Besides boolean operators, there are the functions all(), which returns true when all of the items in the sequence passed as parameters are true, and any(), which returns true if any item is true.
Bitwise Operators
Left Shift (<<)
Right Shift (>>)
And (&)
Or (|)
Exclusive Or (^)
Inversion (~)
Step17:  1011
Step19:  Order of Operations
Python uses the standard order of operations as taught in Algebra and Geometry classes. That, mathematical expressions are evaluated in the following order (memorized by many as PEMDAS or BODMAS {Brackets, Orders or pOwers, Division, Multiplication, Addition, Subtraction}) .
(Note that operations which share a table row are performed from left to right. That is, a division to the left of a multiplication, with no parentheses between them, is performed before the multiplication simply because it is to the left.)
| Name  | Syntax    | Description   | PEMDAS Mnemonic   |
|----------------------------   |---------- |----------------------------------------------------------------------------------------------------------------------------------------   |-----------------  |
| Parentheses   | ( ... )   | Before operating on anything else, Python must evaluate all parentheticals starting at the innermost level. (This includes functions.)    | Please    |
| Exponents     | **   | As an exponent is simply short multiplication or division, it should be evaluated before them.    | Excuse    |
| Multiplication and Division   | * / // %  | Again, multiplication is rapid addition and must, therefore, happen first.    | My Dear   |
| Addition and Subtraction  | + -   | They should happen independent to one another and finally operated among eachother    | Aunt Sally    |
| operators                | descriptions                           |
|--------------------------|----------------------------------------|
| (), [], {}, ‘’           | tuple, list, dictionnary, string       |
| x.attr, x[], x[i
<ASSISTANT_TASK:>
Python Code:
a = 10
b = 22
print("a =", a, ", b =", b)
print("~~~~~~~~~~~~~~~~~")
print("a + b:\t", a + b)
print("a - b:\t", a - b)
print("a * b:\t", a * b)
print("a / b:\t", a / b)
print("a//b:\t", a//b)
print("a % b:\t", a % b)
print("-a:\t", -a)
print("a < b:\t", a < b)
print("a > b:\t", a > b)
print("a <= b:\t", a <= b)
print("a >= b:\t", a >= b)
print("abs(a):\t", abs(a))
import math
print("sqrt(a):", math.sqrt(a))
Explanation: Operators
We are now going to explore Operators. They are single or bi character symbols represent a specific type of operation, say addition, multiplication or comparision. 
Python provides many types of operators. We will explore them based on their functionality namely. 
Assignment Operators
Arithmetic Operators
Relational Operators
Logical/Boolean Operators
Bitwise Operators
Arithmetic Operators
Python supports all most common maths operations as shown in the below table
| Syntax    | Math  | Operation Name    |
|-------------- |-------------------------------------------    |------------------------------------------------------------------ |
| a + b   | a + b     | addition  |
| a - b   | a - b     | subtraction   |
| a * b   |  a * b   | multiplication    |
| a / b   |  a \div b  | division (see note below)    |
| a // b  |  a//b     | floor division (e.g. 5//2=2)  |
| a % b   |  a % b    | modulo    | 
| -a  | -a | negation     | 
| abs(a)| <code>&#124; a &#124;</code>  | absolute value    |
| ab  | ab  | exponent  |
| math.sqrt(a)  |  sqrt a   | square root   |
<center>Note</center>
In order to use math.sqrt() function, you must explicitly load the math module by adding import math at the top of your file, where all the other modules import's are defined.
We will explore the below operators with various primary data types  
Numeric Vs Numeric
Following mathemetical operations are supported in python between numeric data
End of explanation
a = "10"
b = 22
print("a =", a, ", b =", b)
print("~~~~~~~~~~~~~~~~~")
# print("a + b:\t", a + b)
# print("a - b:\t", a - b)
print("a * b:\t", a * b)
# print("a / b:\t", a / b)
# print("a//b:\t", a//b)
# print("a % b:\t", a % b)
# print("-a:\t", -a)
# print("a < b:\t", a < b)
# print("a > b:\t", a > b)
# print("a <= b:\t", a <= b)
# print("a >= b:\t", a >= b)
# print("abs(a):\t", abs(a))
# import math
# print("sqrt(a):", math.sqrt(a))
Explanation: Numeric Vs String
End of explanation
a = "10"
b = 22 + 4j
print("a =", a, ", b =", b)
print("~~~~~~~~~~~~~~~~~")
try:
    print("a * b:\t", a * b)
except Exception as e:
    print(e)
Explanation: As shown above only "*" multiplication is possible between string & real numeric value
Complex Vs String
End of explanation
a = 10 + 4j
b = 10
print("a =", a, ", b =", b)
print("~~~~~~~~~~~~~~~~~")
print("a + b:\t", a + b)
print("a - b:\t", a - b)
print("a * b:\t", a * b)
print("a / b:\t", a / b)
# print("a//b:\t", a//b)
# print("a % b:\t", a % b)
print("-a:\t", -a)
# print("a < b:\t", a < b)
# print("a > b:\t", a > b)
# print("a <= b:\t", a <= b)
# print("a >= b:\t", a >= b)
print("abs(a):\t", abs(a))
import math
# print("sqrt(a):", math.sqrt(a))
Explanation: Complex Vs Numeric
End of explanation
a = 10
c = 0 
c += a
print("c =", c)
c -= a/2
print("c =", c)
c *= a
print("c =", c)
c /= a
print("c =", c)
c **= a
print("c =", c)
c //= a
print("c =", c)
c %= a
print("c =", c)
Explanation: Thus we can see that following operations are not possible with complex data type  floor (//), mod (%), compare (<, >, >=, <=).
Assignment Operators
| Syntax    | Math  | Operation Name |
|-------------- |-------------------------------------------|------------------------------------------------------------------ |
| +=  | a + b     | addition  |
| -=  | a - b     | subtraction   |
| *=  |  a * b   | multiplication    |
| /=  |  a \div b  | division (see note below)    |
| //=     |  a//b     | floor division (e.g. 5//2=2)  |
| %=  |  a % b    | modulo    | 
Numeric
Int
End of explanation
a = 10.20
c = 0 
c += a
print("c =", c)
c -= a/2
print("c =", c)
c *= a
print("c =", c)
c /= a
print("c =", c)
c **= a
print("c =", c)
c //= a
print("c =", c)
c %= a
print("c =", c)
Explanation: Real Number
End of explanation
a = 10 + 20j
c = 0 
c += a
print("c =", c)
c -= a/2
print("c =", c)
c *= a
print("c =", c)
c /= a
print("c =", c)
c **= a
print("c =", c)
# c //= a
# print("c =", c)
# c %= a
# print("c =", c)
Explanation: Complex Number
End of explanation
a = True
c = 0 
c += a
print("c =", c)
c -= a/2
print("c =", c)
c *= a
print("c =", c)
c /= a
print("c =", c)
c **= a
print("c =", c)
c //= a
print("c =", c)
c %= a
print("c =", c)
a = False
c = 0 
c += a
print("c =", c)
c -= a/2
print("c =", c)
c *= a
print("c =", c)
# c /= a
# print("c =", c)
c **= a
print("c =", c)
# c //= a
# print("c =", c)
# c %= a
# print("c =", c)
Explanation: Boolean Number
End of explanation
There are following relational operators supported by Python language
Explanation: Relational Operators
End of explanation
a = 10
b = 21.22
print(a < b)
print(a > b)
print(a <= b)
print(a >= b)
print(a == b)
print(a != b)
Explanation: | Syntax    | Math   | Operation Name       |
|---------- |--------|----------------------|
| <         | a < b  | Less- than           | 
| >         | a > b  | Greater- than        |
| <=        | a <= b | Less- than- equal    |
| >=        | a >= b | Greater- than- equal |
| ==        | a == b | Equal to             | 
| !=        | a != b | not equal to         |
Numeric Vs Numeric
End of explanation
a = 10
b = "Mayank Shrivastava"
# print(a < b)
# print(a > b)
# print(a <= b)
# print(a >= b)
print(a == b)
print(a != b)
Explanation: Numeric Vs String
End of explanation
a = 10
b = 10 + 21j
# print(a < b)
# print(a > b)
# print(a <= b)
# print(a >= b)
print(a == b)
print(a != b)
Explanation: Numeric Vs Complex
End of explanation
a = 10 + 20j
b = 10 + 21j
# print(a < b)
# print(a > b)
# print(a <= b)
# print(a >= b)
print(a == b)
print(a != b)
Explanation: Complex Vs Complex
End of explanation
a = 10 + 20j
b = "Rishi Rai"
# print(a < b)
# print(a > b)
# print(a <= b)
# print(a >= b)
print(a == b)
print(a != b)
Explanation: Complex Vs String
End of explanation
a = "Manish Nandle"
b = "Saurabh Dubey"
print(a < b)
print(a > b)
print(a <= b)
print(a >= b)
print(a == b)
print(a != b)
Explanation: String  Vs String
End of explanation
print (0 and 3) # Shows 0
print (2 and 3 )# Shows 3
print (0 or 3) # Shows 3
print (2 or 3) # Shows 2
print (not 0) # Shows True
print (not 2) # Shows False
print (2 in (2, 3)) # Shows True
print (2 is 3) # Shows False
Explanation: Logical/Boolean Operators
| Syntax    | example        | Operation Name  | Meaning                                                   |
|---------- |----------------|---------------- |-----------------------------------------------------------|
| and     | a and b      | Logical AND     | returns true if and only if both expressions are true     |
| or      | a or b       | Logical OR      | returns true if and only if even an expressions are true  |
| not     | not(a and b) | Logical NOT     | returns reverse of the expression                         |
| is      | a is b       | Logical IS      | returns true both references are same object else false   |
| in      | in           | Logical IN      | returns true if first is found in second else false       |
Example:
End of explanation
a = "Sunil Kumar Bhele"
x = 10 #-> 1010 
y = 11 #-> 1011
Explanation: Besides boolean operators, there are the functions all(), which returns true when all of the items in the sequence passed as parameters are true, and any(), which returns true if any item is true.
Bitwise Operators
Left Shift (<<)
Right Shift (>>)
And (&)
Or (|)
Exclusive Or (^)
Inversion (~)
End of explanation
x = 10 #-> 1010 
y = 11 #-> 1011
print("x << 2 = ", x<<2)
print("x =", x)
print("x >> 2 = ", x>>2)
print("x &y  = ", x&y)
print("x | y  = ", x|y)
print("x^y = ", x^y)
print("x =", x)
print("~x = ", ~x)
print("~y = ", ~y)
Explanation: 1011
OR
0 0 | 0 
0 1 | 1
1 0 | 1
1 1 | 1
AND
0 0 | 0
0 1 | 0
1 0 | 0
1 1 | 1
End of explanation
print (round(3.14159265, 2))
Explanation: Order of Operations
Python uses the standard order of operations as taught in Algebra and Geometry classes. That, mathematical expressions are evaluated in the following order (memorized by many as PEMDAS or BODMAS {Brackets, Orders or pOwers, Division, Multiplication, Addition, Subtraction}) .
(Note that operations which share a table row are performed from left to right. That is, a division to the left of a multiplication, with no parentheses between them, is performed before the multiplication simply because it is to the left.)
| Name  | Syntax    | Description   | PEMDAS Mnemonic   |
|----------------------------   |---------- |----------------------------------------------------------------------------------------------------------------------------------------   |-----------------  |
| Parentheses   | ( ... )   | Before operating on anything else, Python must evaluate all parentheticals starting at the innermost level. (This includes functions.)    | Please    |
| Exponents     | **   | As an exponent is simply short multiplication or division, it should be evaluated before them.    | Excuse    |
| Multiplication and Division   | * / // %  | Again, multiplication is rapid addition and must, therefore, happen first.    | My Dear   |
| Addition and Subtraction  | + -   | They should happen independent to one another and finally operated among eachother    | Aunt Sally    |
| operators                | descriptions                           |
|--------------------------|----------------------------------------|
| (), [], {}, ‘’           | tuple, list, dictionnary, string       |
| x.attr, x[], x[i:j], f() | attribute, index, slide, function call |
| +x, -x, ~x               | unary negation, bitwise invert         |
| *                       | exponent                               |
| , /, %                  | multiplication, division, modulo       |
| +, -                     | addition, substraction                 |
| <<, >>                   | bitwise shifts                         |
| &                        | bitwise and                            |
| ^                        | bitwise xor                            |
|                          | bitwise or                             |
| <, <=, >=, >             | comparison operators                   |
| ==, !=, is, is not, in,  | comparison operators (continue)        |
| not in                   | comparison operators (continue)        |
| not                      | boolean NOT                            |
| and                      | boolean AND                            |
| or                       | boolean OR                             |
| lambda                   | lamnda expression                      |
Formatting output
round()
End of explanation
<END_TASK>