<jupyter_start><jupyter_text>Boolean Operator<jupyter_code>x=1
y=2
print(x>y)
print(10>11)
print(10==10)
print(10!=11)
#using bool() function

print(bool("Hello"))
print(bool(15))
print(bool(1))

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

print(myFunction())
def yourFunction():return False

if yourFunction():
  print("Yes!")
else:
  print("No")<jupyter_output>No<jupyter_text>You Try!<jupyter_code>print(10>9)

a=6
b=7
print(a==b)
print(a!=a)<jupyter_output>True
False
False<jupyter_text>Arithmetic Operators<jupyter_code>print(10+5)
print(10-5)
print(10*5)
print(10/5)
print(10%5) #modulo division, remainder
print(10//5) #floor division
print(10//3) #floor division
print(10%3) #3x3=9+1<jupyter_output>15
5
50
2.0
0
2
3
1<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)
print(a<<1) #011 11000
print(a<<2) #1111 0000
print(b>>1) #1 0000 0110
print(b>>2) #00000 011         carry flag bit = 01<jupyter_output>12
61
49
-61
120
240
6
3<jupyter_text>Python Assignment Operators<jupyter_code>a=60
a+=3 #Same as a=a+3
    #Same as a=60+3, a=63

print(a)<jupyter_output>63<jupyter_text>Logical Operators<jupyter_code>#and logical operator

a=True
b=False

print(a and b)
print(not(a and b))
print(a or b)
print(not(a or b))
print(a is b)
print(a is not b)<jupyter_output>False
True
{'fraction_non_alphanumeric': 0.1561483409238777, 'fraction_numerical': 0.09629147690305791, 'mean_word_length': 7.890173410404624, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 29, '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': '471870', 'license': 'Apache-2.0', 'n_tokens_mistral': 768, 'n_tokens_neox': 689, 'n_words': 139, 'path': 'Expressions_and_Operations.ipynb', 'repo_name': 'aila-vertudez/CPEN-21A-ECE-2-1', 'size': '1537'}