<jupyter_start><jupyter_text>Arithmetic Operator<jupyter_code>a = 2
b = 3
c = a % b
print ("Line 5 - Value of c is ", c)
c = a**b
print ("Line 6 - Value of c is ", c)
a = 10
b = 5
c = a//b
print ("Line 7 - Value of c is ", c)<jupyter_output>Line 5 - Value of c is  2
Line 6 - Value of c is  8
Line 7 - Value of c is  2<jupyter_text>Assignment Operators<jupyter_code>a = 3
b = 2
c = a + b
print ("Line 1 - Value of c is ", c)
c += a
print ("Line 2 - Value of c is ", c )
c *= a
print ("Line 3 - Value of c is ", c )
c /= a
print ("Line 4 - Value of c is ", c )
c %= a
print ("Line 5 - Value of c is ", c)
c **= a
print ("Line 6 - Value of c is ", c)
c //= a
print ("Line 7 - Value of c is ", c)<jupyter_output>Line 1 - Value of c is  5
Line 2 - Value of c is  8
Line 3 - Value of c is  24
Line 4 - Value of c is  8.0
Line 5 - Value of c is  2.0
Line 6 - Value of c is  8.0
Line 7 - Value of c is  2.0<jupyter_text>Comparison Operators<jupyter_code># equal to  Operator 
a = 21
b = 10
c=(a == b)
print(a == b)
print('Equal to operator',c)

a = 10
b = 10
print(a == b)
print('Equal to operator',c)
# Not equal to  Operator
a = 21
b = 10
c=(a != b)
print((a != b))
# Greater than and less than operator
a = 21
b = 10
c=(a > b)
print(a > b)
print('Greater than operator',c)

# Less than operator
a = 21
b = 10
c=(a < b)
print(a < b)
print(' Less than operator',c)
a = 21
b = 10
c=(a <= b)
print(a <= b)
print(' Less than equal to operator',c)
a = 21
b = 10
c=(a>=b)
print(a >= b)
print(' Greater than equal to operator',c)<jupyter_output>False
Equal to operator False
True
Equal to operator False
True
True
Greater than operator True
False
 Less than operator False
False
 Less than equal to operator False
True
 Greater than equal to operator True<jupyter_text>Bitwise Operators<jupyter_code>a = 60 # 60 = 0011 1100
b = 13 # 13 = 0000 1101
c = a & b; # 12 = 0000 1100
print ("result of AND is ", c,':',bin(c))
c = a | b; # 61 = 0011 1101
print ("result of OR is ", c,':',bin(c)) 
c = a ^ b; # 49 = 0011 0001
print ("result of EXOR is ", c,':',bin(c))
c = ~a; # -61 = 1100 0011
print ("result of COMPLEMENT is ", c,':',bin(c))
c = a << 2; # 240 = 1111 0000
print ("result of LEFT SHIFT is ", c,':',bin(c))
c = a >> 2; # 15 = 0000 1111
print ("result of RIGHT SHIFT is ", c,':',bin(c))<jupyter_output>result of AND is  12 : 0b1100
result of OR is  61 : 0b111101
result of EXOR is  49 : 0b110001
result of COMPLEMENT is  -61 : -0b111101
result of LEFT SHIFT is  240 : 0b11110000
result of RIGHT SHIFT is  15 : 0b1111<jupyter_text>Logical Operators<jupyter_code>input1=True
input2=False
print(input1 or input2)
print(not input2)<jupyter_output>True
True<jupyter_text>Membership Operators<jupyter_code>x=['mango','jackfruit','orange',250]
print('orange' in x)
print(250 not in x)
dict={1:100,'new':[1,2,'hi']}
print('new'in dict)
print(100 in dict)<jupyter_output>True
False<jupyter_text>Identity Operators<jupyter_code>x1=100
x2=100
print(x1 is x2)
print(id(x1))
print(id(x2))
a1=['sachin','dravid',1000.8989]
a2=['sachin','dravid',1000.8989]
print(a1 is a2)
print(id(a1))
print(id(a2))<jupyter_output>False
63435353544
63435366792
{'fraction_non_alphanumeric': 0.1463336535382645, 'fraction_numerical': 0.09157861031059879, 'mean_word_length': 3.7987711213517663, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '35726', 'license': 'CC0-1.0', 'n_tokens_mistral': 1485, 'n_tokens_neox': 1267, 'n_words': 471, 'path': 'Online Certificate Course in Data Science and Machine Learning/5 Operators.ipynb', 'repo_name': 'jsrikantappa/nielit', 'size': '3123'}