<jupyter_start><jupyter_text>Fundamentals of Python Python Variable<jupyter_code>x = 'Sally'

a = 0
a,b,c = 0,1,2

print(x)
print(a)
print(b)
print(c)
print(a,b,c)<jupyter_output>Sally
0
1
2
0 1 2<jupyter_text>Casting<jupyter_code>d = 4
d = int(4)
print(d)<jupyter_output>4<jupyter_text>Type () function<jupyter_code>d = 4
d = int(4)
print(type(d))<jupyter_output><class 'int'><jupyter_text>Double quotes and single quotes<jupyter_code>y = "Ana"
print(y)

y = 'Ana'
print(y)<jupyter_output>Ana
Ana<jupyter_text>Multiple Variables<jupyter_code>#x = 'Tony'
k = l = m = 'four'
print(k)
print(l)
print(m)
print(k,l,m)<jupyter_output>four
four
four
four four four<jupyter_text>Output Variable<jupyter_code>print('Python programming is fun')

h = 'fun'
p = 'Python programming is '
print(p+ h)<jupyter_output>Python programming is fun
Python programming is fun<jupyter_text>Arithmetic Operations<jupyter_code>c, d = 2, 4

print(c+d)
print(c-d)
print(d*c)
print(int(d/c))
print(d%c)
print(3//2) #1.50
print(d**c)<jupyter_output>6
-2
8
2
0
1
16<jupyter_text>Assignment Operators<jupyter_code>q = 10
q+=5 #same as q = q + 5

print(q) #same as q = q + 5, q = 10 + 5 = 15<jupyter_output>15<jupyter_text>Boolean logic<jupyter_code>s = 10
print(s^2)
print(s|2)<jupyter_output>8
10<jupyter_text>Comparison Operators<jupyter_code>print(s>q)
print(s==s)
print(q==q)<jupyter_output>False
True
True<jupyter_text>Logical Operators<jupyter_code>s>q and s==s #False
s>q or s==s #True

print(s>q and s==s)
print(s>q or s==s)<jupyter_output>False
True<jupyter_text>Identity Operators<jupyter_code>s is q
print(s is not q)<jupyter_output>True<jupyter_text>Bitwise Operators Shift right<jupyter_code>u = 2 #0001
print(u<<1)

g = 10
print(g<<1)<jupyter_output>4
20
{'fraction_non_alphanumeric': 0.14844649021864212, 'fraction_numerical': 0.035097813578826235, 'mean_word_length': 7.872448979591836, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 46, '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': '13', 'dir': 'jupyter-structured-clean-dedup', 'id': '401975', 'license': 'Apache-2.0', 'n_tokens_mistral': 868, 'n_tokens_neox': 816, 'n_words': 153, 'path': 'Fundamentals_of_Python.ipynb', 'repo_name': 'EKielz/OOP-58002', 'size': '1738'}