<jupyter_start><jupyter_text>Operations and Expressions 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) #module division that shows the remainder after division
print(10//3) #floor division, 3.33
print(10**2) #concatenation<jupyter_output>15
5
50
2.0
0
3
100<jupyter_text>Bitwise Operators<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                  #shift to the left
print(a>>1) #0001 1110         carry bit -0         #shift to the right<jupyter_output>12
61
49
240
30<jupyter_text>Assignment Operator<jupyter_code>a+=3  #Same As a=a+3, a=60+3, a=63
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))
a=60
b=13

print(a>b and b>a)
print(a==a or b==b)
print(not(a==a or b==b))<jupyter_output>False
True
False<jupyter_text>Identity Operators<jupyter_code>print(a is b)
print(a is not b)<jupyter_output>False
True
{'fraction_non_alphanumeric': 0.14224137931034483, 'fraction_numerical': 0.07512315270935961, 'mean_word_length': 6.8125, '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': '304873', 'license': 'Apache-2.0', 'n_tokens_mistral': 763, 'n_tokens_neox': 691, 'n_words': 147, 'path': 'Operations_and_Expressions.ipynb', 'repo_name': 'patrickemmanuelarnedo/CPEN-21A-ECE-2-3', 'size': '1624'}