<jupyter_start><jupyter_text>Boolean Operators<jupyter_code>a=1
b=2

print(a>b)
print(a<b)
print(a==a)
print(a!=b)<jupyter_output>False
True
True
True<jupyter_text>bool() function<jupyter_code>print(bool(15))
print(bool(True))
print(bool(1))

print(bool(False))
print(bool(0))
print(bool(None))
print(bool())<jupyter_output>True
True
True
False
False
False
False<jupyter_text>Functions return a Boolean<jupyter_code>def myFunction():return True
print(myFunction())
def myFunction(): return False

if myFunction(): 
  print("True")
else:
  print("False")<jupyter_output>False<jupyter_text>Arithmetic Operator<jupyter_code>print(10>9)
print(10<9)
print(10==9)
print(10+5)
print(10-5)
print(10*5)
print(10/5)
print(10%5) #modulo division that shows the remainder after division
print(10//3) #floor division
print(10**2) #concatenation<jupyter_output>15
5
50
2.0
0
3
100<jupyter_text>Bitwise Operator<jupyter_code>a=60 #0011 1100
b=13 #0000 1101

print(a&b)
print(a|b)
print(a^b)

print(a<<2) #0011 1100   0111 1000-120
print(a>>1) #0001 1110-30   carry bit-0<jupyter_output>12
61
49
240
30<jupyter_text>Assignment Operator<jupyter_code>a+=3
print(a)<jupyter_output>63<jupyter_text>Logical Operator<jupyter_code>a=True
b=False

print(a and b)
print(a or b)
print(not(a or b))

print(a>b and b>a)
print(a==a and b==b)
print(not(a==a and b==b))<jupyter_output>False
True
False
False
True
False<jupyter_text>Identity Operator<jupyter_code>print(a is b)
print(a is not b)<jupyter_output>False
True
{'fraction_non_alphanumeric': 0.14573539288112827, 'fraction_numerical': 0.07656145063801209, 'mean_word_length': 9.136054421768707, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 31, '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': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '154745', 'license': 'Apache-2.0', 'n_tokens_mistral': 718, 'n_tokens_neox': 650, 'n_words': 123, 'path': 'Expression_and_Operations.ipynb', 'repo_name': 'JemuelR/CPEN-21-ECE-2-3', 'size': '1489'}