Notestoday

Mon 30 June 2025
# Cell 1 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 10 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 11 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 12 — Topic: Loops
for i in range(10): print(i*i)
# Cell 13 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 14 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 15 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 16 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 17 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 18 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 19 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 20 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 21 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 22 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 23  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 24 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 25  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 26 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 27 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 28 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 29 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 30 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 31 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 32 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 33 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 34  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 35 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 36 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 37 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 38  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 39 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 40 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 41  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 42 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 43 — Topic: Loops
for i in range(10): print(i*i)
# Cell 44 — Topic: Loops
for i in range(10): print(i*i)
# Cell 45 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 46 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 47 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 48 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 49 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 50 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 51 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 52 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 53 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 54  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 55  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 56 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 57 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 58 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 59  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 60 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 61 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 62  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 63 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 64 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 65 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 66 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 67 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 68 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 69 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 70 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 71  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 72 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 73 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 74 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 75 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 76 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 77 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 78 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 79  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 80 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 81 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 82  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 83 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 84 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 85 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 86 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 87 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 88 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 89  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 90 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 91  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 92 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 93 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 94 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 95 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 96 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 97 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 98 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 99 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 100 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 101  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 102 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 103 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 104 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 105 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 106 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 107 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 108 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 109 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 110 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 111 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 112 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 113 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 114 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 115 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 116 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 117 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 118 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 119 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 120  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 121 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 122 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 123  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 124 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 125 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 126  Topic: Loops
while True:
    print('Break')
    break
# Cell 127 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 128 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 129 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 130 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 131 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 132 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 133 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 134 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 135 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 136 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 137 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 138  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 139 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 140 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 141  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 142  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 143 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 144 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 145 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 146 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 147 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 148  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 149  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 150 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 151 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 152  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 153 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 154 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 155 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 156 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 157 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 158 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 159 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 160  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 161 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 162  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 163  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 164 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 165 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 166 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 167 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 168 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 169 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 170 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 171 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 172 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 173  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 174 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 175  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 176 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 177 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 178 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 179 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 180 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 181 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 182 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 183 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 184 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 185 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 186 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 187 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 188 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 189  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 190 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 191 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 192 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 193 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 194 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 195  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 196 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 197 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 198 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 199 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 200 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 201 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 202 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 203 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 204 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 205 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 206 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 207 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 208 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 209 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 210 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 211 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 212 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 213 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 214 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 215 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 216 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 217  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 218 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 219  Topic: Loops
while True:
    print('Break')
    break
# Cell 220  Topic: Loops
while True:
    print('Break')
    break
# Cell 221 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 222 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 223 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 224  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 225 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 226 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 227 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 228 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 229 — Topic: Loops
for i in range(10): print(i*i)
# Cell 230 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 231 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 232 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 233 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 234 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 235 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 236 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 237 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 238 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 239 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 240 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 241  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 242  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 243 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 244 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 245 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 246  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 247  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 248 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 249  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 250 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 251 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 252 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 253  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 254 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 255 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 256  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 257 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 258 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 259  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 260 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 261 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 262 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 263 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 264  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 265 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 266 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 267 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 268 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 269 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 270  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 271 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 272  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 273 — Topic: Loops
for i in range(10): print(i*i)
# Cell 274 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 275 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 276 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 277 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 278 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 279 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 280 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 281 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 282 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 283 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 284 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 285  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 286 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 287  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 288 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 289 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 290 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 291 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 292 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 293 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 294 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 295 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 296 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 297 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 298 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 299 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 300 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 301 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 302 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 303 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 304 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 305 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 306 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 307  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 308 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 309 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 310 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 311 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 312 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 313  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 314 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 315 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 316 — Topic: Loops
for i in range(10): print(i*i)
# Cell 317  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 318 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 319 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 320 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 321 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 322 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 323 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 324 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 325  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 326 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 327 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 328  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 329 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 330 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 331 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 332 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 333 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 334 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 335 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 336 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 337 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 338 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 339 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 340 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 341 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 342 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 343 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 344 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 345 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 346 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 347 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 348 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 349 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 350 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 351 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 352  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 353 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 354 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 355 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 356  Topic: Loops
while True:
    print('Break')
    break
# Cell 357 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 358 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 359 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 360  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 361 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 362 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 363 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 364 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 365 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 366  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 367 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 368 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 369 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 370 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 371 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 372 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 373 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 374 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 375  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 376  Topic: Loops
while True:
    print('Break')
    break
# Cell 377  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 378 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 379 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 380 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 381  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 382 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 383 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 384 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 385 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 386 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 387 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 388 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 389 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 390 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 391 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 392 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 393 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 394 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 395 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 396  Topic: Loops
while True:
    print('Break')
    break
# Cell 397 — Topic: Loops
for i in range(10): print(i*i)
# Cell 398 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 399  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 400 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 401 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 402 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 403 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 404 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 405 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 406 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 407 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 408 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 409 — Topic: Loops
for i in range(10): print(i*i)
# Cell 410 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 411 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 412 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 413 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 414 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 415 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 416 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 417  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 418  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 419  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 420 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 421  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 422 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 423  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 424 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 425 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 426 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 427 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 428 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 429  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 430 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 431 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 432 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 433 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 434 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 435 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 436 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 437 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 438 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 439 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 440 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 441  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 442 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 443 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 444 — Topic: Loops
for i in range(10): print(i*i)
# Cell 445  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 446 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 447 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 448  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 449  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 450 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 451 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 452 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 453 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 454 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 455 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 456 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 457 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 458 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 459 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 460 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 461  Topic: Loops
while True:
    print('Break')
    break
# Cell 462 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 463 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 464 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 465  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 466 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 467 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 468 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 469 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 470 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 471  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 472 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 473  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 474 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 475 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 476 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 477 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 478 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 479 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 480 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 481 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 482  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 483 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 484 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 485 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 486 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 487  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 488  Topic: Loops
while True:
    print('Break')
    break
# Cell 489  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 490 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 491 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 492  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 493  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 494 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 495  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 496 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 497 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 498 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 499 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 500 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 501 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 502 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 503 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 504 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 505 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 506 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 507 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 508 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 509 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 510 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 511 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 512 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 513  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 514 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 515 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 516 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 517 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 518 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 519 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 520 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 521 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 522 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 523 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 524 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 525 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 526 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 527 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 528  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 529 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 530 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 531 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 532 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 533 — Topic: Loops
for i in range(10): print(i*i)
# Cell 534 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 535 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 536 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 537 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 538  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 539 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 540  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 541 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 542 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 543 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 544 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 545  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 546 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 547 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 548 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 549 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 550  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 551 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 552 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 553 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 554 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 555 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 556 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 557  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 558 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 559  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 560 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 561 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 562  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 563 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 564 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 565  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 566 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 567  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 568  Topic: Loops
while True:
    print('Break')
    break
# Cell 569 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 570 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 571  Topic: Loops
while True:
    print('Break')
    break
# Cell 572 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 573 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 574 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 575 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 576 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 577  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 578 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 579 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 580 — Topic: Loops
for i in range(10): print(i*i)
# Cell 581 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 582 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 583 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 584 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 585 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 586  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 587 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 588 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 589 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 590 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 591 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 592  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 593 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 594 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 595 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 596 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 597 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 598 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 599 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 600  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 601 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 602 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 603  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 604  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 605 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 606 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 607 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 608 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 609 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 610  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 611 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 612  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 613 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 614 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 615 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 616 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 617 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 618  Topic: Loops
while True:
    print('Break')
    break
# Cell 619  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 620 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 621 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 622 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 623  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 624 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 625 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 626  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 627 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 628 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 629 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 630 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 631 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 632 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 633  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 634 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 635 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 636 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 637 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 638  Topic: Loops
while True:
    print('Break')
    break
# Cell 639 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 640 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 641 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 642 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 643 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 644 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 645 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 646 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 647 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 648 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 649 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 650 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 651  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 652 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 653 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 654 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 655 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 656 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 657 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 658 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 659 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 660 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 661 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 662 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 663 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 664 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 665 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 666  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 667  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 668 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 669 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 670 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 671  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 672 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 673 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 674 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 675 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 676  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 677 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 678  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 679 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 680 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 681 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 682 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 683 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 684 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 685 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 686 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 687 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 688 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 689 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 690 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 691  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 692  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 693 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 694 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 695 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 696 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 697 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 698 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 699 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 700 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 701 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 702 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 703 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 704  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 705  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 706 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 707  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 708 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 709  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 710 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 711  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 712 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 713 — Topic: Loops
for i in range(10): print(i*i)
# Cell 714 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 715 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 716 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 717 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 718 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 719 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 720 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 721 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 722 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 723 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 724 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 725 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 726  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 727 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 728 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 729 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 730 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 731 — Topic: Loops
for i in range(10): print(i*i)
# Cell 732 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 733  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 734 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 735 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 736 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 737  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 738  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 739  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 740 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 741  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 742 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 743 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 744 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 745 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 746 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 747 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 748  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 749  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 750 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 751  Topic: Loops
while True:
    print('Break')
    break
# Cell 752 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 753 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 754 — Topic: Loops
for i in range(10): print(i*i)
# Cell 755 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 756 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 757 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 758 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 759 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 760 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 761 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 762 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 763  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 764 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 765 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 766 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 767 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 768 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 769 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 770 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 771 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 772 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 773 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 774  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 775 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 776 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 777 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 778  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 779 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 780 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 781  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 782 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 783 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 784 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 785 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 786 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 787 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 788 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 789 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 790 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 791  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 792  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 793 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 794 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 795 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 796 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 797 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 798  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 799 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 800 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 801  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 802 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 803 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 804 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 805 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 806 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 807 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 808 — Topic: Loops
for i in range(10): print(i*i)
# Cell 809 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 810 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 811 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 812  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 813 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 814  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 815 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 816 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 817 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 818 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 819 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 820 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 821 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 822 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 823  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 824 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 825 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 826 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 827  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 828  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 829 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 830 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 831 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 832  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 833 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 834 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 835 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 836 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 837 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 838 — Topic: Loops
for i in range(10): print(i*i)
# Cell 839 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 840 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 841 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 842  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 843 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 844 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 845 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 846 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 847 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 848  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 849 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 850  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 851 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 852 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 853 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 854 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 855  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 856 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 857  Topic: Loops
while True:
    print('Break')
    break
# Cell 858 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 859  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 860 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 861 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 862 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 863 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 864 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 865 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 866 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 867  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 868 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 869 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 870  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 871  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 872 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 873 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 874 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 875 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 876  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 877 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 878 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 879 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 880 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 881 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 882 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 883  Topic: Loops
while True:
    print('Break')
    break
# Cell 884 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 885 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 886  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 887 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 888 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 889 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 890 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 891 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 892 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 893 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 894 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 895 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 896 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 897 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 898 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 899 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 900 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 901 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 902 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 903  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 904 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 905  Topic: Loops
while True:
    print('Break')
    break
# Cell 906 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 907 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 908 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 909 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 910  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 911  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 912  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 913 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 914 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 915 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 916 — Topic: Loops
for i in range(10): print(i*i)
# Cell 917  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 918 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 919 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 920 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 921 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 922 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 923 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 924 — Topic: Loops
for i in range(10): print(i*i)
# Cell 925 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 926 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 927 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 928  Topic: Loops
while True:
    print('Break')
    break
# Cell 929 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 930  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 931 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 932  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 933 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 934 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 935 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 936 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 937 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 938 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 939 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 940  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 941 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 942 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 943 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 944 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 945 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 946 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 947  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 948 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 949 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 950  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 951  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 952 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 953 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 954 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 955 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 956 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 957 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 958 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 959 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 960 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 961  Topic: Loops
while True:
    print('Break')
    break
# Cell 962 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 963  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 964 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 965 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 966 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 967 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 968 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 969 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 970  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 971  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 972 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 973 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 974 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 975  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 976 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 977 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 978 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 979 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 980 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 981  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 982 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 983 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 984 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 985  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 986  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 987  Topic: Loops
while True:
    print('Break')
    break
# Cell 988 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 989 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 990  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 991 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 992 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 993 — Topic: Loops
for i in range(10): print(i*i)
# Cell 994 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 995 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 996  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 997  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 998 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 999  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1000 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1001 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 1002  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1003 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1004  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1005 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1006  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1007 — Topic: Loops
for i in range(10): print(i*i)
# Cell 1008  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1009 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1010 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1011  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1012 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1013 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 1014  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1015 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1016 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1017 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 1018 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1019 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1020  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1021 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1022 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1023  Topic: Loops
while True:
    print('Break')
    break
# Cell 1024 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1025  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1026 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1027 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1028 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 1029 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 1030 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 1031 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 1032 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1033 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 1034 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1035 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1036  Topic: Loops
while True:
    print('Break')
    break
# Cell 1037 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 1038 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1039 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 1040 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1041 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1042 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1043 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1044 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1045 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1046 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1047 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 1048 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 1049 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1050 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1051 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1052 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1053 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1054 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 1055 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1056 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1057 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1058 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 1059  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1060  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1061 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1062  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1063 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1064 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1065 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1066  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1067 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1068 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1069 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1070  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1071 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1072 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1073 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1074 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1075 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1076 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 1077 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1078 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1079 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1080 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 1081 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1082 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1083  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1084  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1085 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1086 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 1087 — Topic: Loops
for i in range(10): print(i*i)
# Cell 1088 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1089 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 1090 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1091 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1092 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1093 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1094 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1095 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1096 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1097 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 1098 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1099 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1100 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1101 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 1102  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1103 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1104  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1105 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1106 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1107 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 1108 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1109  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1110 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1111 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1112 — Topic: Loops
for i in range(10): print(i*i)
# Cell 1113 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 1114  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1115  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1116 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1117  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1118  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1119 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1120 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1121 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1122 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 1123 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1124  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1125 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1126 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1127 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1128 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1129 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1130  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1131 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1132 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1133 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1134 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1135 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 1136 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1137 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1138 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1139 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1140  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1141 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1142 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1143 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1144 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1145  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1146 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1147 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1148  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1149 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1150 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1151 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1152 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1153 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1154 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 1155  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1156 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1157 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1158 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1159 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1160 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1161 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1162  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1163 — Topic: Loops
for i in range(10): print(i*i)
# Cell 1164 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1165 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1166 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1167  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1168 — Topic: Loops
for i in range(10): print(i*i)
# Cell 1169 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1170 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1171 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1172  Topic: Loops
while True:
    print('Break')
    break
# Cell 1173 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 1174  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1175 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1176 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1177 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 1178 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 1179  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1180 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1181 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1182 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1183  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1184  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1185 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1186 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1187 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 1188 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1189 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1190 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1191 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1192 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1193 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1194 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 1195 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1196 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1197 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 1198 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1199 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 1200 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1201  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1202 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1203  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1204 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1205 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 1206 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1207  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1208 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1209 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1210 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1211 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 1212 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 1213 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1214 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1215 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 1216 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1217 — Topic: Loops
for i in range(10): print(i*i)
# Cell 1218 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1219 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1220 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 1221  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1222 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1223  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1224  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1225 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 1226 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1227 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1228  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1229 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1230 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 1231 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1232 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1233  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1234 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1235 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1236 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1237  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1238 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1239 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1240 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 1241 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 1242 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1243 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1244  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1245 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 1246 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1247 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1248  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1249 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1250  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1251 — Topic: Loops
for i in range(10): print(i*i)
# Cell 1252 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1253 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1254 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1255 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 1256  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1257 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1258 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1259  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1260 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1261 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1262 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 1263 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1264 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1265  Topic: Loops
while True:
    print('Break')
    break
# Cell 1266  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1267 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1268 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1269 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1270  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1271 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 1272  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1273 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1274  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1275 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1276 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1277 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1278 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1279 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1280 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1281 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 1282 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1283 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1284  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1285 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1286 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1287 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1288 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1289 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1290 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1291 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 1292 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1293 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1294  Topic: Loops
while True:
    print('Break')
    break
# Cell 1295 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1296 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1297 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1298 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 1299 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1300 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1301 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1302 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1303 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1304 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 1305 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 1306 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1307 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1308 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1309 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1310 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1311 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1312 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 1313 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1314 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1315 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1316 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 1317 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1318 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1319 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1320 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1321 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1322 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1323 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 1324 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1325 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1326 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 1327  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1328 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1329 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1330 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1331  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1332 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1333 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1334 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1335 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1336 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 1337  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1338  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1339 — Topic: Loops
for i in range(10): print(i*i)
# Cell 1340 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1341 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1342  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1343  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1344 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 1345 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1346 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 1347 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1348 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1349 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1350 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1351 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1352 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1353 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 1354 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1355 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1356 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1357 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1358 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 1359  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1360 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 1361 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1362 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1363 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1364 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1365 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1366 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1367 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 1368 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 1369 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1370 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1371 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1372  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1373 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 1374  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1375 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1376  Topic: Loops
while True:
    print('Break')
    break
# Cell 1377 — Topic: Loops
for i in range(10): print(i*i)
# Cell 1378 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1379 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 1380 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1381 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 1382 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1383 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1384  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1385  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1386 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1387 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1388  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1389 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 1390 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 1391 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1392 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 1393 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 1394 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1395 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1396 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1397 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 1398 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1399 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1400 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1401 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 1402  Topic: Loops
while True:
    print('Break')
    break
# Cell 1403 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1404 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1405 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1406 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 1407 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1408 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1409 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1410  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1411 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1412 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1413 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1414 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1415 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1416 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1417 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1418 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1419 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 1420 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1421 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1422 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1423 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1424 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1425 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1426 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1427 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1428 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1429 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1430 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 1431 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1432 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1433 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1434 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1435 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1436 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 1437 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1438  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1439 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1440 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1441  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1442 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1443 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 1444 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1445 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1446  Topic: Loops
while True:
    print('Break')
    break
# Cell 1447  Topic: Loops
while True:
    print('Break')
    break
# Cell 1448 — Topic: Loops
for i in range(10): print(i*i)
# Cell 1449 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1450  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1451 — Topic: Loops
for i in range(10): print(i*i)
# Cell 1452 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1453 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1454 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1455 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1456 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1457 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1458 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1459 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1460 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1461 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1462 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1463 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 1464  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1465 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1466  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1467 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1468 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1469 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 1470 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1471 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1472  Topic: Loops
while True:
    print('Break')
    break
# Cell 1473 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1474 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1475 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1476 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 1477 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1478 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1479 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1480  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1481 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1482  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1483 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1484 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1485 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1486 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 1487 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1488 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1489  Topic: Loops
while True:
    print('Break')
    break
# Cell 1490 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 1491  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1492 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1493 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 1494 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1495 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1496 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1497 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1498 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1499 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1500 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1501 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1502 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1503 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 1504 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 1505  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1506 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1507  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1508 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1509 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1510 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1511 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1512 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1513 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1514 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1515 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1516 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1517 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1518 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 1519 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1520 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1521 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1522 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 1523 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1524 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1525 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1526 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1527 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1528 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1529 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1530 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 1531 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 1532 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1533 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1534  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1535 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1536 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 1537 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1538 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1539 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1540 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1541 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 1542 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 1543  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1544 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1545 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1546 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1547 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1548 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 1549 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1550 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 1551  Topic: Loops
while True:
    print('Break')
    break
# Cell 1552 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1553 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1554  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1555 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1556  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1557 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1558  Topic: Loops
while True:
    print('Break')
    break
# Cell 1559 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1560 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 1561 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1562 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1563 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 1564  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1565 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1566 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1567 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1568 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1569 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1570 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1571 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1572 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 1573 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1574 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1575 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1576 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1577  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1578 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1579 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 1580 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1581 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1582  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1583 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1584 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1585 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1586 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1587 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1588 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1589  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1590  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1591 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1592 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1593 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1594 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1595 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1596 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1597  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1598  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1599 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1600  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1601 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1602  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1603 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1604 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1605 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1606 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1607 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1608 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1609 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1610 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 1611 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1612 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1613  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1614 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1615 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1616 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 1617 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 1618 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1619 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1620 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1621 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 1622 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1623 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1624 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1625  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1626 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1627 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1628  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1629 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1630 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1631 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1632  Topic: Loops
while True:
    print('Break')
    break
# Cell 1633 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1634 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 1635 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1636  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1637 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 1638 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1639 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1640 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 1641 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 1642  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1643 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1644 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1645 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1646 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1647  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1648 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1649  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1650  Topic: Loops
while True:
    print('Break')
    break
# Cell 1651 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1652  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1653 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1654 — Topic: Loops
for i in range(10): print(i*i)
# Cell 1655  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1656 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1657 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1658 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1659 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1660  Topic: Loops
while True:
    print('Break')
    break
# Cell 1661 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1662 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 1663 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1664 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1665 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1666 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1667 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1668 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1669 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1670  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1671 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1672 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1673 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1674 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1675 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1676 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1677 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1678 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1679 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 1680 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1681 — Topic: Loops
for i in range(10): print(i*i)
# Cell 1682 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1683 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1684 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 1685 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1686 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1687 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1688 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1689 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1690 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1691 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 1692  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1693 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1694 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1695 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1696 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1697 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 1698  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1699 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1700 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1701 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1702  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1703 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1704 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1705 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1706 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 1707  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1708 — Topic: Loops
for i in range(10): print(i*i)
# Cell 1709 — Topic: Loops
for i in range(10): print(i*i)
# Cell 1710  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1711 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1712 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1713 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1714 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 1715 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1716 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1717 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 1718 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1719 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 1720 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 1721 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1722  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1723 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1724 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1725 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1726  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1727 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1728 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1729  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1730 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 1731 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 1732  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1733  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1734 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1735 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1736 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1737 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 1738 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1739 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1740  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1741  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1742  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1743 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1744 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1745 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1746 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1747 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1748  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1749  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1750 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1751  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1752 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1753 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1754 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1755 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1756 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1757 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1758  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1759 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1760 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1761 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1762 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1763  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1764  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1765 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1766 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1767 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1768 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1769  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1770 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1771 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 1772 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1773  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1774 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1775 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1776 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1777 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1778  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1779 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1780  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1781 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1782 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1783 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1784 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1785 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1786 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1787 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1788 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1789 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1790 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1791  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1792 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1793 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1794 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 1795 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1796  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1797 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1798 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1799  Topic: Loops
while True:
    print('Break')
    break
# Cell 1800 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1801  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1802 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1803 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1804 — Topic: Loops
for i in range(10): print(i*i)
# Cell 1805 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1806 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1807 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1808 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1809 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1810  Topic: Loops
while True:
    print('Break')
    break
# Cell 1811  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1812 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1813 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 1814 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1815 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1816 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1817 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1818 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 1819 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 1820 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1821 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1822 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 1823 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1824 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1825 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1826  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1827 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1828 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1829 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1830 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1831 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1832  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1833 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1834 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1835 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1836 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1837  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1838 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1839 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1840 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1841 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1842 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1843 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1844 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1845 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1846  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1847 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1848 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1849 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 1850 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 1851 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1852 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1853 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1854  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1855 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1856 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1857 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1858 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1859 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 1860 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1861 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1862 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1863 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1864 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1865  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1866 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1867 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 1868 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1869  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1870 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1871 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1872 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1873  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1874 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1875 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1876 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1877 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1878 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1879  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1880 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 1881 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1882 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1883 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 1884 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1885 — Topic: Loops
for i in range(10): print(i*i)
# Cell 1886 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1887 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 1888 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1889 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1890 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1891 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1892 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1893 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 1894 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 1895 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1896  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1897  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1898 — Topic: Loops
for i in range(10): print(i*i)
# Cell 1899 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1900  Topic: Loops
while True:
    print('Break')
    break
# Cell 1901 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1902 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1903 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1904 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1905 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1906 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 1907  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1908 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1909  Topic: Loops
while True:
    print('Break')
    break
# Cell 1910  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1911 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1912 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1913 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1914 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 1915 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1916 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1917 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1918 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1919 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1920 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1921 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1922 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1923  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1924 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 1925 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1926 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1927  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1928 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1929 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 1930 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1931 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1932 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 1933 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1934 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1935 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1936 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1937  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1938 — Topic: Loops
for i in range(10): print(i*i)
# Cell 1939 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1940 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1941 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1942  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1943 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1944 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1945 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 1946 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1947 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1948 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1949 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1950 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 1951 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1952 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 1953 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1954  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1955 — Topic: Loops
for i in range(10): print(i*i)
# Cell 1956 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1957 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 1958  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1959 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 1960 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1961 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1962  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1963 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1964 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1965  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1966 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 1967 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1968 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1969 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 1970 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 1971  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 1972 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1973 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1974  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1975  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 1976 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 1977 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 1978 — Topic: Loops
for i in range(10): print(i*i)
# Cell 1979 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1980 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1981 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 1982 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 1983 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1984  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 1985 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1986 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 1987  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 1988 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1989 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 1990 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 1991 — Topic: Loops
for i in range(10): print(i*i)
# Cell 1992 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 1993 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1994 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 1995 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 1996 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 1997 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 1998 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 1999 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2000 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2001 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2002 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2003 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2004 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2005 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2006 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2007 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2008 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2009 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2010 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 2011 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2012 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 2013 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2014 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2015 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2016 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2017 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2018 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2019 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 2020 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2021 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2022  Topic: Loops
while True:
    print('Break')
    break
# Cell 2023 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2024 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 2025  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2026 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2027 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 2028 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2029 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 2030 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2031 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2032  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2033 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2034 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2035 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2036 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 2037 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2038 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 2039  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2040  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2041 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2042 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2043 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2044 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 2045 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2046 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2047  Topic: Loops
while True:
    print('Break')
    break
# Cell 2048 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2049 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 2050 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2051 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2052 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2053  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2054 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2055  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2056 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2057 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2058 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2059  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2060  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2061 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2062 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2063  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2064 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2065 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2066 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2067  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2068 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2069  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2070  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2071  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2072  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2073  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2074  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2075 — Topic: Loops
for i in range(10): print(i*i)
# Cell 2076 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2077 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2078 — Topic: Loops
for i in range(10): print(i*i)
# Cell 2079 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2080 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2081  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2082 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2083 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 2084 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2085  Topic: Loops
while True:
    print('Break')
    break
# Cell 2086  Topic: Loops
while True:
    print('Break')
    break
# Cell 2087  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2088 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2089 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2090  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2091 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2092  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2093 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2094 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 2095 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 2096 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2097 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 2098 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2099 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2100 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2101 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2102 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2103 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2104 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2105 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2106 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2107 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2108 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2109 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2110 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2111  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2112 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2113 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 2114 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2115  Topic: Loops
while True:
    print('Break')
    break
# Cell 2116 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2117 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2118 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2119 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 2120 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2121  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2122  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2123 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 2124 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2125 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 2126 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2127 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2128 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2129  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2130 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2131 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 2132 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 2133  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2134 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2135 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2136 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2137 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2138 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2139 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 2140 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2141 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2142 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2143 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 2144 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2145 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2146 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 2147 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 2148 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2149 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2150 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2151 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2152  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2153 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2154 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2155 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 2156  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2157  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2158  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2159  Topic: Loops
while True:
    print('Break')
    break
# Cell 2160 — Topic: Loops
for i in range(10): print(i*i)
# Cell 2161  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2162 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2163 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2164 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2165  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2166 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2167 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2168  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2169 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2170 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2171 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2172 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2173 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2174  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2175 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2176 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2177 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2178 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2179 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2180 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2181 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2182 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 2183 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2184 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2185 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2186  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2187 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2188  Topic: Loops
while True:
    print('Break')
    break
# Cell 2189 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2190  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2191 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2192  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2193  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2194  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2195  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2196  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2197 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2198 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2199 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 2200 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2201 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2202 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2203  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2204 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2205 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2206 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2207 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 2208 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2209 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2210 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2211 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2212 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2213 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2214 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2215 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2216 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2217 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2218 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2219 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2220 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2221 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2222 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2223 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2224 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2225  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2226 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 2227 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2228 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2229 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2230  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2231 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2232 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2233  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2234 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2235 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2236 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2237 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2238 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2239  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2240 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2241  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2242 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2243 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2244 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2245 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2246 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2247 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2248 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2249  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2250 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2251  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2252 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2253 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2254 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2255 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 2256 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2257 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2258 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2259 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2260 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2261 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 2262  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2263 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2264 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2265 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 2266 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2267  Topic: Loops
while True:
    print('Break')
    break
# Cell 2268  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2269 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2270 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2271 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2272 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 2273 — Topic: Loops
for i in range(10): print(i*i)
# Cell 2274 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2275 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2276 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2277 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2278 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2279 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2280 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2281 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2282 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2283  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2284 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2285 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2286 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2287 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2288 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2289 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 2290 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2291  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2292 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2293 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2294 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2295 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 2296 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2297 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2298 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2299 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2300 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2301 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2302 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2303 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 2304  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2305 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2306 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2307  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2308 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2309 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2310 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 2311 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2312 — Topic: Loops
for i in range(10): print(i*i)
# Cell 2313 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 2314 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2315  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2316 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2317 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 2318 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2319 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2320 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 2321  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2322 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2323 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2324 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2325 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2326  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2327 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2328 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2329  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2330  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2331 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2332 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2333 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2334 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2335  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2336 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 2337 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2338 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 2339  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2340 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2341 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 2342  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2343 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 2344  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2345 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2346 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2347 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 2348 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2349  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2350 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2351 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2352 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2353 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2354 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2355 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2356  Topic: Loops
while True:
    print('Break')
    break
# Cell 2357 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2358 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2359 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2360 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2361 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2362 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2363 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2364 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2365 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2366  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2367 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2368 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2369 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 2370 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 2371 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2372 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2373 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2374 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 2375 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 2376  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2377 — Topic: Loops
for i in range(10): print(i*i)
# Cell 2378 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2379 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2380  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2381  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2382 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2383 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2384 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2385 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2386  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2387 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2388  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2389 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2390 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2391 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2392 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2393 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2394 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2395 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 2396 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2397 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2398 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2399 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2400  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2401  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2402  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2403 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2404 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2405 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 2406 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 2407  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2408  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2409 — Topic: Loops
for i in range(10): print(i*i)
# Cell 2410  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2411 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 2412 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2413  Topic: Loops
while True:
    print('Break')
    break
# Cell 2414 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2415  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2416  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2417  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2418 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2419 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 2420 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2421  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2422  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2423 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2424 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2425 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2426 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2427  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2428 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2429 — Topic: Loops
for i in range(10): print(i*i)
# Cell 2430 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2431 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2432 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2433  Topic: Loops
while True:
    print('Break')
    break
# Cell 2434 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2435 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 2436 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2437  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2438 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2439 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2440 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2441 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2442  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2443 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2444 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2445 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2446 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2447  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2448 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2449 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2450 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2451 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 2452  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2453 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 2454  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2455 — Topic: Loops
for i in range(10): print(i*i)
# Cell 2456 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2457 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2458 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2459  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2460 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2461 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2462 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2463 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2464  Topic: Loops
while True:
    print('Break')
    break
# Cell 2465  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2466  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2467 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2468  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2469 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2470 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2471 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2472 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2473 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2474 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 2475  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2476  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2477 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2478 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2479 — Topic: Loops
for i in range(10): print(i*i)
# Cell 2480 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2481  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2482 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2483 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 2484 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2485 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 2486 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 2487 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2488 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 2489 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2490 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2491  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2492 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2493 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2494  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2495 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2496 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2497 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2498 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2499 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 2500 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2501 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2502  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2503 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2504  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2505 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 2506 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2507 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2508 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2509 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2510 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2511 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 2512 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2513 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2514  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2515 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2516 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2517 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2518 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2519 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2520 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2521 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2522  Topic: Loops
while True:
    print('Break')
    break
# Cell 2523 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2524 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2525 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2526 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2527 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2528 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2529 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2530 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 2531  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2532 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 2533 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2534 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 2535 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2536 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2537 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2538 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2539 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2540  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2541 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2542 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2543 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2544 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2545 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2546 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2547 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2548 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 2549  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2550 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2551 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2552 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2553 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2554 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2555 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2556 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2557 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2558 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2559 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 2560 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2561 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2562 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 2563 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2564 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 2565 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2566 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2567 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2568 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2569 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2570 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2571 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2572 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2573 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2574 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2575 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2576 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2577 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2578 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2579  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2580 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 2581 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2582 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 2583 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2584 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2585  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2586 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2587 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 2588 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2589  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2590 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2591 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2592 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2593 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2594 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2595  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2596 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2597  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2598  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2599 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2600 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2601 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 2602 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2603  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2604 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2605 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2606 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2607 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2608  Topic: Loops
while True:
    print('Break')
    break
# Cell 2609 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 2610 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2611 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2612 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2613 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2614 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2615 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2616 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 2617 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2618 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2619 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2620 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 2621 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 2622 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2623 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2624 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 2625 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2626 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2627 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2628 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2629 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2630  Topic: Loops
while True:
    print('Break')
    break
# Cell 2631 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 2632 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2633 — Topic: Loops
for i in range(10): print(i*i)
# Cell 2634 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2635 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2636 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 2637 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2638 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2639 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2640 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2641 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2642 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2643 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2644 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2645 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 2646  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2647 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 2648  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2649 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2650 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 2651 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2652 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 2653 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2654 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 2655 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 2656 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2657 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2658 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2659 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2660 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2661  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2662 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2663 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2664  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2665 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2666  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2667 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 2668 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2669 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2670  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2671 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2672 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2673 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 2674 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 2675  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2676  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2677 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2678 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2679 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 2680 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2681  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2682 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2683 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2684 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2685 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2686 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 2687 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2688 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2689 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2690 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2691 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2692  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2693 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2694 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2695 — Topic: Loops
for i in range(10): print(i*i)
# Cell 2696 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2697 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 2698 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2699  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2700 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2701 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 2702 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2703  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2704 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2705 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2706 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 2707 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2708 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2709 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2710 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2711 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2712 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2713 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2714 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2715 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 2716 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2717 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2718 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 2719 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2720 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 2721 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2722 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2723 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2724 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 2725 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2726  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2727 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 2728  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2729 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 2730 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2731 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2732 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2733 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2734 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2735  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2736 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2737 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 2738 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2739 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 2740  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2741 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 2742  Topic: Loops
while True:
    print('Break')
    break
# Cell 2743 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2744 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2745  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2746 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2747 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2748 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2749 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2750 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2751 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2752 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2753 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2754 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2755 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2756 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2757 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 2758 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2759 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2760 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2761 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2762  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2763  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2764 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 2765 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 2766 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2767 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2768 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2769 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 2770 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2771 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2772 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2773 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2774 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2775 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2776 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2777 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 2778 — Topic: Loops
for i in range(10): print(i*i)
# Cell 2779 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 2780 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2781 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2782  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2783  Topic: Loops
while True:
    print('Break')
    break
# Cell 2784 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2785 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2786 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2787 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2788 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2789 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2790 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2791  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2792 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2793 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2794 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2795  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2796 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2797 — Topic: Loops
for i in range(10): print(i*i)
# Cell 2798 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2799  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2800 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2801 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 2802  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2803 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2804 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 2805 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2806 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2807 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2808 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2809 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2810 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 2811 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 2812 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2813  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2814  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2815 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 2816  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2817  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2818 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2819 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 2820 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2821  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2822 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2823 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 2824 — Topic: Loops
for i in range(10): print(i*i)
# Cell 2825 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2826 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2827 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2828 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2829 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2830 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2831 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2832  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2833  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2834 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2835 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2836 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2837 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2838 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2839 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2840 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 2841 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 2842  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2843  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2844 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2845  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2846 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 2847 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2848 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2849 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2850 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2851 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2852 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2853 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2854 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2855 — Topic: Loops
for i in range(10): print(i*i)
# Cell 2856 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2857 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2858 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 2859 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2860  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2861 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2862 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2863 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2864 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2865 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2866  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2867 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2868 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2869  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2870 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 2871 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 2872 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2873 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 2874 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2875 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2876 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2877 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2878  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2879  Topic: Loops
while True:
    print('Break')
    break
# Cell 2880 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 2881 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2882 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2883 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2884 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2885 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2886 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2887 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2888 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2889 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 2890 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 2891  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2892  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2893 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2894 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 2895 — Topic: Loops
for i in range(10): print(i*i)
# Cell 2896 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2897  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2898 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 2899 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2900 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 2901 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2902 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2903  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2904 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2905 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2906  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2907 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2908 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2909 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2910 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 2911 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2912 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2913  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2914  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2915  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2916 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2917  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2918 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 2919 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 2920 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2921 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2922 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2923 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2924 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2925 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2926 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2927 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2928 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2929 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 2930  Topic: Loops
while True:
    print('Break')
    break
# Cell 2931  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2932 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2933 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 2934  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 2935 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2936 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2937 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2938  Topic: Loops
while True:
    print('Break')
    break
# Cell 2939 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2940 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2941 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 2942 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2943 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2944 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2945 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 2946 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 2947 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2948 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2949 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2950 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 2951  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2952 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2953 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2954 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2955 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2956  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2957  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 2958 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 2959 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2960 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 2961 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2962 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2963 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2964 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2965 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2966 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 2967 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 2968 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2969 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 2970  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2971 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 2972 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2973 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2974 — Topic: Loops
for i in range(10): print(i*i)
# Cell 2975 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2976  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2977 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 2978 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 2979 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 2980 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 2981 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2982  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 2983 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 2984 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 2985  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 2986 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 2987 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 2988 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 2989 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 2990 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 2991 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 2992 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 2993 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2994 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 2995 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2996 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 2997 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2998 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 2999  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3000 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3001 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3002 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 3003 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 3004 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3005 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3006  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3007  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3008  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3009 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3010 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3011 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3012 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 3013 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3014 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3015 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3016 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3017 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3018 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3019 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3020 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 3021 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3022 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3023  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3024 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3025 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3026 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3027 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3028 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 3029 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3030 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3031 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3032  Topic: Loops
while True:
    print('Break')
    break
# Cell 3033  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3034 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3035 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3036  Topic: Loops
while True:
    print('Break')
    break
# Cell 3037 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3038 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3039 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3040 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3041  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3042  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3043 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3044 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3045  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3046 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3047 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3048 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3049 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3050  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3051 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3052 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 3053 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3054  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3055  Topic: Loops
while True:
    print('Break')
    break
# Cell 3056 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3057  Topic: Loops
while True:
    print('Break')
    break
# Cell 3058 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3059 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3060  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3061 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3062 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3063 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 3064 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3065  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3066  Topic: Loops
while True:
    print('Break')
    break
# Cell 3067 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3068 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3069 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3070  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3071 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3072 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 3073 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 3074 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3075 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3076 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3077 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3078 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3079  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3080 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 3081 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3082 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3083 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3084  Topic: Loops
while True:
    print('Break')
    break
# Cell 3085  Topic: Loops
while True:
    print('Break')
    break
# Cell 3086  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3087  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3088 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 3089 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 3090 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3091 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 3092  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3093 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 3094 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3095 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3096 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3097  Topic: Loops
while True:
    print('Break')
    break
# Cell 3098  Topic: Loops
while True:
    print('Break')
    break
# Cell 3099  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3100 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3101 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3102 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3103 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3104 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3105  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3106  Topic: Loops
while True:
    print('Break')
    break
# Cell 3107 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3108 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3109 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3110 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3111 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 3112  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3113 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3114 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3115 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 3116 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3117 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3118  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3119 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3120 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3121 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3122  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3123  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3124 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3125  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3126 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3127 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3128 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3129  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3130 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3131 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 3132 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3133 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 3134 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3135 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3136 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3137 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3138 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3139 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3140  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3141 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3142 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3143 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3144 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3145 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 3146 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3147 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3148 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3149 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 3150 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3151 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3152 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3153  Topic: Loops
while True:
    print('Break')
    break
# Cell 3154 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3155 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3156 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3157 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 3158 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3159 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 3160 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3161  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3162  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3163 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3164 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 3165 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3166 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 3167 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3168 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3169 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 3170 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3171 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3172 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 3173 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 3174 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3175 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 3176 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3177 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3178  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3179 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3180 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3181 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3182 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3183  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3184 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3185 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3186 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3187 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3188 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3189 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3190 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3191 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3192 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3193 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3194 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3195  Topic: Loops
while True:
    print('Break')
    break
# Cell 3196 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3197  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3198 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3199 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3200 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3201  Topic: Loops
while True:
    print('Break')
    break
# Cell 3202  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3203 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3204  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3205 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3206 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3207 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 3208  Topic: Loops
while True:
    print('Break')
    break
# Cell 3209 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3210  Topic: Loops
while True:
    print('Break')
    break
# Cell 3211 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 3212 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3213 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3214 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3215 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 3216 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3217 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3218 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3219  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3220 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 3221 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3222 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3223 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 3224 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 3225 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3226 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3227  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3228 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3229  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3230 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 3231 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3232  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3233 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3234 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3235  Topic: Loops
while True:
    print('Break')
    break
# Cell 3236 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3237  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3238  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3239  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3240 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3241 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3242 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 3243 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3244 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3245  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3246 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 3247 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3248  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3249 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 3250 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3251 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3252 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 3253 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3254 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3255 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3256 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3257 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3258 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3259 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3260 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3261 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 3262 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3263  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3264  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3265 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3266 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3267 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3268 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 3269 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3270 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3271 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 3272 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3273  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3274 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3275 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3276 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3277 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3278 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3279 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3280 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3281 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3282 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3283 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3284 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 3285 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3286  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3287 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3288 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 3289 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3290  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3291 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3292 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 3293  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3294 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3295 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3296 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 3297 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3298 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 3299  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3300 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3301 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3302  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3303 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3304 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3305 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3306 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3307 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3308 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3309  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3310 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3311 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3312  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3313  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3314  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3315 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3316 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3317 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3318  Topic: Loops
while True:
    print('Break')
    break
# Cell 3319  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3320  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3321 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3322 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3323 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3324 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 3325 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3326 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3327 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3328 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3329 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3330 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3331 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3332  Topic: Loops
while True:
    print('Break')
    break
# Cell 3333 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3334 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 3335 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3336 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3337 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 3338 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3339 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3340 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3341 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3342 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 3343 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3344 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3345 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3346 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3347 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3348 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3349 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3350 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3351 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3352 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3353  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3354 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 3355 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3356 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3357 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3358 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3359 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3360 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3361 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3362 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 3363  Topic: Loops
while True:
    print('Break')
    break
# Cell 3364 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 3365 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3366  Topic: Loops
while True:
    print('Break')
    break
# Cell 3367 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 3368  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3369 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3370 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3371 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3372 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3373 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3374 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3375 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3376 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3377 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 3378 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3379 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3380 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 3381 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3382 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3383  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3384 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 3385 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3386 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3387 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3388 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3389 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3390  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3391 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3392 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3393 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 3394 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 3395 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 3396  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3397  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3398 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 3399 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3400 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3401 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 3402  Topic: Loops
while True:
    print('Break')
    break
# Cell 3403 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 3404  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3405 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3406 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3407  Topic: Loops
while True:
    print('Break')
    break
# Cell 3408 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3409 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3410 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3411 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3412 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3413  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3414  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3415 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3416 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3417  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3418 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3419  Topic: Loops
while True:
    print('Break')
    break
# Cell 3420 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3421 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3422 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 3423 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3424 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 3425 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 3426 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3427 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 3428  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3429 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3430 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3431 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3432 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3433 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3434 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3435 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 3436 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3437 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3438 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3439  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3440 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3441 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3442 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3443 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3444  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3445 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 3446 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3447 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3448 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3449 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3450 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 3451 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3452 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 3453 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3454 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3455 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 3456 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3457 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3458 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3459 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3460 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3461 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3462 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3463 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3464 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3465 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3466 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3467 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3468 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3469  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3470 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3471 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3472  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3473 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3474 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3475 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 3476 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3477 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3478 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3479 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3480 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 3481  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3482 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3483 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3484  Topic: Loops
while True:
    print('Break')
    break
# Cell 3485 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3486 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3487 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3488 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3489 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3490 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 3491 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3492 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3493  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3494 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3495 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3496 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3497 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 3498 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3499 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3500 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3501  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3502 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 3503 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3504 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3505 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3506 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3507  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3508 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3509 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 3510 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3511 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3512 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 3513 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3514 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3515 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 3516 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3517 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3518  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3519 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3520 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3521  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3522 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3523 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 3524 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3525 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3526 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 3527 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3528 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 3529 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3530 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3531 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 3532 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3533 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3534 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 3535 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 3536 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 3537 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3538 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3539 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3540  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3541  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3542 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3543 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3544 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3545 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3546 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3547 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3548 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3549 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 3550 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 3551 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 3552 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3553 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3554 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3555  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3556 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3557 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3558  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3559 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3560 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 3561 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3562 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3563 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3564 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 3565  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3566  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3567 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3568 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3569 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3570  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3571 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3572 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3573 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 3574 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3575 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3576 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3577 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3578 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3579 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 3580 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 3581  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3582 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 3583 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3584 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3585 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 3586 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 3587 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3588 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3589 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3590 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3591 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3592 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3593 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3594 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3595 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3596 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3597  Topic: Loops
while True:
    print('Break')
    break
# Cell 3598 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3599  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3600 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 3601 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3602 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3603 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3604  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3605 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3606 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3607 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3608 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 3609 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3610 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 3611 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3612  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3613 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 3614 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3615 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3616 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3617 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3618 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3619 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3620 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3621  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3622 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3623 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3624 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3625 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3626 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3627 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3628 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3629 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 3630 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 3631 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3632 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3633 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3634 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3635 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3636 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3637 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3638  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3639  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3640 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3641 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3642  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3643 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3644 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3645 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3646 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3647 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3648 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 3649 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3650 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3651  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3652 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3653  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3654  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3655 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3656 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3657 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 3658 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3659 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3660 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3661 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3662 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3663 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3664  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3665 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3666  Topic: Loops
while True:
    print('Break')
    break
# Cell 3667 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 3668 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3669 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3670 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 3671 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3672 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3673 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3674  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3675 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 3676 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3677 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3678 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3679 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3680  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3681 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3682  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3683 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3684 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3685  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3686 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3687 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3688  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3689 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3690 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3691 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3692 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 3693 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3694 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3695 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3696 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 3697  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3698  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3699 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3700 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3701 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 3702 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3703 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3704 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3705 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3706 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3707 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3708  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3709 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3710 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3711 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3712  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3713 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3714 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3715  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3716 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3717 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3718 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 3719 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3720 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3721 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3722 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3723 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3724 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3725 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3726 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3727  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3728 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 3729  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3730 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 3731 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3732 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 3733 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3734 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3735 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 3736 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3737 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3738 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 3739 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3740 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3741  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3742 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3743  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3744 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 3745 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3746  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3747  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3748  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3749 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3750  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3751 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3752 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3753 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3754  Topic: Loops
while True:
    print('Break')
    break
# Cell 3755 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3756 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 3757 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3758 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3759 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3760 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 3761 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3762 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 3763 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3764 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3765 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3766  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3767 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 3768 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3769 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3770 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3771 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3772 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3773 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 3774 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3775 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3776 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 3777 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3778 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3779 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3780 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3781  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3782 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 3783 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 3784 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3785 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3786 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3787  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3788 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 3789 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3790 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 3791 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3792 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3793 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3794  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3795 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3796  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3797 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3798 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 3799 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3800 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 3801  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3802 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3803 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3804 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3805 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 3806 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3807 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3808 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 3809 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 3810 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3811 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3812 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3813 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3814 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 3815 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 3816 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3817 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3818 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3819 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3820 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3821 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 3822  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3823 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3824 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3825 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 3826  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3827  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3828  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3829 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3830 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3831 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3832 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3833 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 3834  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3835 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3836 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3837 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3838  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3839 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3840 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3841 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3842 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3843 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 3844 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3845 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3846  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3847  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3848  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3849 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3850 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3851 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 3852  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3853  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3854 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3855  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3856 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3857 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3858 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3859 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3860 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3861 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3862 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3863 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 3864 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3865 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3866 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 3867 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3868 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3869 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3870 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3871 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3872 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 3873 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 3874 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3875 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3876 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3877  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3878 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3879 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3880  Topic: Loops
while True:
    print('Break')
    break
# Cell 3881  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3882 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3883 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3884  Topic: Loops
while True:
    print('Break')
    break
# Cell 3885 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 3886 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 3887 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3888 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3889 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 3890 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 3891  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3892 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3893 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3894 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 3895 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3896 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3897 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3898 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3899 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3900 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3901 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3902 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 3903 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3904 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3905 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3906 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3907 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3908 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 3909 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3910  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3911 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3912 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3913 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3914 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3915 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3916 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3917  Topic: Loops
while True:
    print('Break')
    break
# Cell 3918 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 3919  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3920 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3921  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3922 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3923 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 3924 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3925 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3926 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3927 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 3928  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 3929 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3930 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 3931 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3932  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3933 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3934 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3935 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3936  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3937  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3938  Topic: Loops
while True:
    print('Break')
    break
# Cell 3939 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3940 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 3941 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3942 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3943 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3944 — Topic: Loops
for i in range(10): print(i*i)
# Cell 3945 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3946  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3947 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3948 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 3949 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3950 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3951 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3952 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3953 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3954 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3955 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 3956  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3957 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3958 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3959 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 3960 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3961 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 3962 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3963 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3964 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3965 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 3966 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 3967 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3968 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 3969 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3970 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 3971 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3972  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3973  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3974  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 3975 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3976 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 3977  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3978  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3979 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 3980 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3981 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3982 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3983  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 3984 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 3985 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 3986 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3987 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3988 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3989  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3990 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 3991 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 3992 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3993 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 3994 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 3995 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 3996  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 3997 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 3998 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 3999  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 4000  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4001 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4002 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4003 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4004 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4005 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4006  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4007 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 4008 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4009 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4010  Topic: Loops
while True:
    print('Break')
    break
# Cell 4011 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4012 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4013 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 4014  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4015 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4016 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4017 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4018 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4019 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4020 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 4021 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4022  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4023 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4024 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 4025 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4026  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4027 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 4028  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4029 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4030 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 4031 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4032 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4033 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4034 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4035 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4036 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4037 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4038 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4039 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 4040 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4041 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4042 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4043 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4044 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4045 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4046 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4047 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4048  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4049 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4050 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4051 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4052 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4053 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 4054 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4055  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4056 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4057 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4058 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4059 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4060 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4061 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4062 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4063 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4064 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4065 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4066  Topic: Loops
while True:
    print('Break')
    break
# Cell 4067 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4068 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 4069 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4070  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4071 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4072 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4073  Topic: Loops
while True:
    print('Break')
    break
# Cell 4074 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 4075 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4076 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4077 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4078 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4079 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4080 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4081 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4082 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4083 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4084 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4085 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4086 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4087 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4088 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4089 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4090 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4091 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4092 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4093 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4094 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 4095 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4096 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4097 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4098  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4099 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4100 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4101  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4102 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4103  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4104 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 4105 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4106 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4107  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4108 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4109 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4110 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4111  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 4112 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4113 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4114 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4115 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4116 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4117 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4118 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4119  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4120 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4121  Topic: Loops
while True:
    print('Break')
    break
# Cell 4122 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4123 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4124 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4125 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4126 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4127 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4128 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4129 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4130 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4131 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4132  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4133 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4134 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4135 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4136 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4137 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 4138 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4139 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4140 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4141 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 4142 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4143 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4144  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4145 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4146 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4147 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4148 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4149 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4150  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4151 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4152  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 4153 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 4154 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4155 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4156 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4157 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 4158 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4159 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4160  Topic: Loops
while True:
    print('Break')
    break
# Cell 4161 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4162 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4163 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4164 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4165 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 4166  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 4167 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 4168  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4169 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4170  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4171 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 4172 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4173 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4174  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4175 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4176 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4177 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4178 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4179 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4180  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4181 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4182 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4183 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4184  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4185 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4186 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4187 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4188 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4189 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 4190 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4191 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4192 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4193 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4194 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4195 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4196 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4197  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 4198 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4199 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4200 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4201  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4202 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4203 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4204 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4205  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4206  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4207  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4208 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4209 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 4210 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4211 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4212 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4213 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4214 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4215 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4216 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4217  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 4218 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4219 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4220 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4221 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4222 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4223 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 4224  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4225 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4226 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 4227 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4228  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4229 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4230  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4231 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4232 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4233 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4234 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4235 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4236 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4237  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4238 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4239 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4240 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4241 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4242 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4243 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4244 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4245  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4246  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4247 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4248 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4249 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4250 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4251 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4252 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4253  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4254 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4255 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4256 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4257 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4258 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4259 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4260 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 4261 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4262 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4263 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4264 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4265  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4266 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4267 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4268  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4269 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4270 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4271 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4272 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4273 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 4274 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4275 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4276 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4277 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4278 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4279 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4280 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4281 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4282 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4283 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 4284 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4285  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4286 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4287 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4288 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4289  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4290  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 4291  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4292 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4293  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4294  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 4295 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4296 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4297 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 4298  Topic: Loops
while True:
    print('Break')
    break
# Cell 4299 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4300 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4301 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4302 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4303 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4304  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4305 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4306 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4307 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4308 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 4309 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4310 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4311 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4312 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4313 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4314 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4315  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4316 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4317 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4318 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4319 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4320  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4321 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4322 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4323 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4324 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4325 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4326 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4327 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4328 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 4329 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 4330 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4331 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4332 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4333 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4334 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4335 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4336 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4337 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4338 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4339 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4340 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4341 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4342 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4343  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4344 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4345 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4346 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4347  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4348 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4349 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4350  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4351  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4352  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4353  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4354 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4355  Topic: Loops
while True:
    print('Break')
    break
# Cell 4356 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4357 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4358  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4359 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4360 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4361  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4362 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4363 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4364 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4365 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 4366  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4367 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4368 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4369  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4370 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4371 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4372 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4373 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4374 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4375 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4376 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4377  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 4378 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4379 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4380 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 4381 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4382 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4383 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4384 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4385 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4386 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4387 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4388 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4389 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4390 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 4391 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4392 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4393 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 4394 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4395  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4396 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4397 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4398  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4399 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4400  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4401 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4402 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4403 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4404  Topic: Loops
while True:
    print('Break')
    break
# Cell 4405 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4406 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 4407 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4408 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4409  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 4410 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4411  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4412 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4413 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4414 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4415 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4416 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4417 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4418 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 4419 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 4420 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4421 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4422 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4423 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4424 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4425  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4426 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4427 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4428  Topic: Loops
while True:
    print('Break')
    break
# Cell 4429 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4430  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4431 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4432 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4433 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 4434 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4435 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4436  Topic: Loops
while True:
    print('Break')
    break
# Cell 4437 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4438 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4439 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4440 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4441 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4442 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 4443 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 4444 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4445 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4446 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4447 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4448 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4449 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4450 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4451 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4452 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4453  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4454 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4455  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4456 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4457 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4458 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4459 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4460 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4461 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4462 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4463 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4464 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4465 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4466 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4467 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4468 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4469 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4470 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4471  Topic: Loops
while True:
    print('Break')
    break
# Cell 4472 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4473 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4474 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 4475  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4476 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4477 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4478 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4479 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4480 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4481 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4482  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4483 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4484 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4485  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4486 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4487  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4488 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4489 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4490 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4491 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4492 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4493 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4494 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4495 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4496 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4497 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4498 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4499 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4500 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4501 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4502 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4503 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4504  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4505 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4506 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4507 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4508 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4509  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4510  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4511  Topic: Loops
while True:
    print('Break')
    break
# Cell 4512 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4513 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4514 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4515 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4516 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4517 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4518 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4519 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4520 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4521  Topic: Loops
while True:
    print('Break')
    break
# Cell 4522 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4523 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4524 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4525  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4526 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4527 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4528 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4529 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4530 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4531 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4532 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4533 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4534 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4535 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4536 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4537 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4538 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 4539 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4540 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4541 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4542 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4543  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4544 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4545 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4546 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4547  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4548 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4549 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 4550 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4551 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4552 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4553  Topic: Loops
while True:
    print('Break')
    break
# Cell 4554 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4555  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 4556 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4557  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4558  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4559 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 4560 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4561 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4562 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4563  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4564 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4565  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4566 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4567 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4568 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4569 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4570 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4571 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4572 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4573 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4574 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4575 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4576 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4577 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4578 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4579 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4580 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4581 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4582 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4583 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4584 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4585 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4586 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4587 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4588 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4589 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4590 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4591 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4592  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 4593 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4594 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4595  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4596 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4597 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4598 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4599 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4600 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4601 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4602 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4603  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 4604 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4605 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4606 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4607 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4608 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 4609 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4610 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4611 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4612 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4613 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4614  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4615 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4616 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4617 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4618 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4619 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 4620 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4621  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4622 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4623 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4624 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 4625 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 4626 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4627 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4628  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4629 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4630 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4631 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4632 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4633 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4634 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4635 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4636 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4637 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4638 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4639 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4640  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4641 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4642 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4643  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4644 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4645 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4646 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4647 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4648  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4649 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4650 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4651 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4652 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4653 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4654 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4655 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4656  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4657 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4658 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4659 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4660 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4661 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4662 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4663 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4664 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4665 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4666 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4667 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4668 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4669 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4670 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4671 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4672 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4673 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 4674 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4675 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4676  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 4677 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4678 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4679 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4680 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4681 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4682 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4683 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4684  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4685 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4686  Topic: Loops
while True:
    print('Break')
    break
# Cell 4687 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 4688 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4689 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4690 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 4691  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4692 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4693 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4694 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4695 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4696 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4697 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4698 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4699 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4700 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4701  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4702 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4703 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4704  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4705 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4706 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4707 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4708  Topic: Loops
while True:
    print('Break')
    break
# Cell 4709  Topic: Loops
while True:
    print('Break')
    break
# Cell 4710  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4711 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4712 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4713 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4714 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4715  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4716 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 4717 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4718 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4719 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4720  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4721 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4722  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4723 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4724  Topic: Loops
while True:
    print('Break')
    break
# Cell 4725 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4726 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4727  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4728 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4729 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4730 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4731 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4732 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4733 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4734 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4735 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4736 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4737 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4738 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4739 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4740  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4741 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4742 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4743 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4744 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 4745 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4746  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4747 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4748 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4749 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4750  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 4751 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4752 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4753 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4754 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 4755  Topic: Loops
while True:
    print('Break')
    break
# Cell 4756  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4757 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 4758 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4759 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4760 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4761 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4762 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4763  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4764 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4765 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4766  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4767 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4768 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4769 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4770  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4771 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4772 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 4773 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4774 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4775 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4776 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 4777 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4778 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4779 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4780 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4781 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4782 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4783 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4784 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4785 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4786 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4787 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 4788 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4789 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4790 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4791 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 4792 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4793 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 4794 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4795 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4796 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4797 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4798 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4799 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4800 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4801 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4802  Topic: Loops
while True:
    print('Break')
    break
# Cell 4803 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4804 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4805 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4806 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4807 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4808 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4809 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4810 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4811 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4812 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4813 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4814 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4815 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4816 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4817 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4818 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4819 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4820 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4821 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4822 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4823  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4824 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4825 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4826 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4827 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4828 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4829 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4830 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4831 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 4832 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4833 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4834 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4835 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4836 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4837 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4838 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4839 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4840  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4841  Topic: Loops
while True:
    print('Break')
    break
# Cell 4842 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4843 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4844 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4845 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4846 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4847 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4848 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4849 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4850 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4851 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4852 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4853 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4854 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4855  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4856 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4857  Topic: Loops
while True:
    print('Break')
    break
# Cell 4858 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4859  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4860 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4861 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4862 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4863  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4864 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4865  Topic: Loops
while True:
    print('Break')
    break
# Cell 4866 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4867 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4868 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 4869 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4870 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 4871 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 4872  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 4873 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4874 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4875 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4876  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4877 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4878 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4879  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4880 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4881 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 4882 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4883 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4884  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4885  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4886  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4887 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4888 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4889 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 4890 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4891 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 4892 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4893 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4894 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4895 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4896 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4897  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4898 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4899 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4900 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 4901  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4902 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4903  Topic: Loops
while True:
    print('Break')
    break
# Cell 4904 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4905  Topic: Loops
while True:
    print('Break')
    break
# Cell 4906 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4907  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4908  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4909 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4910 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4911  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4912  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4913 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4914  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4915 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4916 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4917 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4918 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4919  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4920 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4921 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4922 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4923 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4924 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4925  Topic: Loops
while True:
    print('Break')
    break
# Cell 4926  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4927 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4928 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4929 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4930 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4931 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4932 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 4933 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4934  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4935 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4936  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4937 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4938 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4939 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4940 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4941 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4942  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4943 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4944 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4945 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 4946 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4947  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4948 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4949  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4950 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 4951  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4952 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4953 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4954 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4955 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4956  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4957 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 4958 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 4959 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4960 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 4961 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4962 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4963 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4964 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 4965 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 4966 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4967  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 4968  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 4969 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4970 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4971  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4972 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 4973  Topic: Loops
while True:
    print('Break')
    break
# Cell 4974 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 4975 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 4976 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4977 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4978 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 4979 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 4980 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 4981 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 4982 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 4983 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4984 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 4985 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 4986  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 4987 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4988 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 4989 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 4990 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 4991  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4992  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 4993 — Topic: Loops
for i in range(10): print(i*i)
# Cell 4994 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 4995 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 4996 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 4997 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 4998 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 4999  Topic: Loops
while True:
    print('Break')
    break
# Cell 5000 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5001 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5002 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5003  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5004 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5005 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5006 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5007 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5008 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5009 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 5010 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5011  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5012 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5013  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5014 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5015 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 5016  Topic: Loops
while True:
    print('Break')
    break
# Cell 5017 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5018 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5019 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5020  Topic: Loops
while True:
    print('Break')
    break
# Cell 5021 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5022 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5023 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 5024 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5025 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5026  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5027 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5028 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5029 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5030  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5031 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5032 — Topic: Loops
for i in range(10): print(i*i)
# Cell 5033 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5034 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 5035 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5036 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5037 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5038 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 5039 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5040 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5041 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5042  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5043 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5044 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 5045 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5046 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5047 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5048 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5049 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5050 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5051 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5052 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5053 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5054 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5055 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5056 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5057 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5058 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 5059 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5060  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5061 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5062  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5063 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5064 — Topic: Loops
for i in range(10): print(i*i)
# Cell 5065  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5066 — Topic: Loops
for i in range(10): print(i*i)
# Cell 5067 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5068 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5069 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5070  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5071 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5072 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 5073  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5074 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5075 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5076 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5077 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5078  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5079 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5080 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5081 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5082 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5083 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5084 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5085 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5086 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5087 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5088 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5089  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5090  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5091 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5092 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 5093 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5094 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5095 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5096 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5097 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5098 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5099 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5100 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5101  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5102  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5103  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5104 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5105 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5106  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5107 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5108 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5109 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5110 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5111 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5112 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5113 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5114 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5115 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5116 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5117 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5118 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5119 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5120 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5121 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5122 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5123  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5124 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5125 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5126 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5127 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5128 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5129 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5130 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5131 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5132  Topic: Loops
while True:
    print('Break')
    break
# Cell 5133 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 5134 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5135 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5136 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5137 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5138 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5139 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5140  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5141  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5142 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5143 — Topic: Loops
for i in range(10): print(i*i)
# Cell 5144 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5145 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5146 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 5147 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5148 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5149  Topic: Loops
while True:
    print('Break')
    break
# Cell 5150 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5151 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5152 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5153 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 5154 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5155 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5156  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5157 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 5158 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5159 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 5160  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5161 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5162 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5163 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5164 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5165 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 5166 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 5167 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5168 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5169  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5170  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5171  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5172 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5173 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5174 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5175 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5176 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5177 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5178  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5179 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5180 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5181 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5182 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 5183 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5184 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5185  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5186 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5187 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5188 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 5189 — Topic: Loops
for i in range(10): print(i*i)
# Cell 5190 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5191 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5192 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5193 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5194 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 5195 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5196 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5197 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5198 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5199 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5200 — Topic: Loops
for i in range(10): print(i*i)
# Cell 5201 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5202 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5203 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5204 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5205 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5206 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5207 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5208 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5209 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5210  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5211 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5212 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5213 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5214  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5215 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5216 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5217 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5218  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5219 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5220 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5221 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5222  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5223 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5224  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5225 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5226  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5227 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5228  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5229 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5230 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5231 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5232 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 5233 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5234 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5235 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5236 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5237 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5238  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5239 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 5240 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5241 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5242 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5243 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5244 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5245 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5246  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5247 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5248 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5249 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5250 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5251 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5252 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5253 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5254 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5255 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5256 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5257 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5258 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5259 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5260  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5261 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5262 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 5263 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5264  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5265 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5266  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5267 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5268 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5269 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5270 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5271 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5272 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5273 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 5274 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5275 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 5276 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5277 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5278 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5279 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5280 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5281  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5282 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5283  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5284 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5285 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5286  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5287 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5288  Topic: Loops
while True:
    print('Break')
    break
# Cell 5289 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5290  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5291 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5292  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5293 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5294 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5295 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5296 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5297 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5298 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5299 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5300 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5301  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5302 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5303 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5304 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5305 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5306  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5307 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5308 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5309 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 5310 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 5311 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5312 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5313 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5314 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5315  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5316 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5317 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 5318 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5319  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5320 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5321 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5322 — Topic: Loops
for i in range(10): print(i*i)
# Cell 5323 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5324 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5325 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5326 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5327 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5328 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5329 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5330 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 5331 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5332  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5333 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5334 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5335 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5336 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5337 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5338 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5339 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 5340 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5341 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 5342 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5343 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5344 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5345 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5346 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5347 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5348 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5349 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5350 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5351 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 5352 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5353 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5354  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5355 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5356 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 5357 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5358 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5359 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5360 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5361 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 5362 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 5363  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5364 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5365 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5366  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5367 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5368  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5369  Topic: Loops
while True:
    print('Break')
    break
# Cell 5370 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5371 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5372 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5373 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5374 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5375 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5376 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5377 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5378 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5379  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5380 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5381 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5382 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 5383 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 5384  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5385  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5386  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5387 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5388 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5389  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5390 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5391 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 5392 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5393 — Topic: Loops
for i in range(10): print(i*i)
# Cell 5394 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 5395 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 5396 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5397 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5398 — Topic: Loops
for i in range(10): print(i*i)
# Cell 5399  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5400  Topic: Loops
while True:
    print('Break')
    break
# Cell 5401 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5402 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5403  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5404 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5405  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5406 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5407  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5408 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5409 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 5410 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5411 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5412 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5413 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 5414 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5415  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5416 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5417 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5418 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 5419 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5420 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5421  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5422  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5423 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5424 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5425 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5426 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5427 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5428 — Topic: Loops
for i in range(10): print(i*i)
# Cell 5429 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 5430  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5431  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5432 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 5433  Topic: Loops
while True:
    print('Break')
    break
# Cell 5434 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5435 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5436  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5437 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5438 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 5439 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5440 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5441 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5442 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5443 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5444 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5445 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5446  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5447  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5448 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5449 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5450 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5451 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5452 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5453 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5454 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5455  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5456 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5457  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5458 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5459 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5460 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5461 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5462  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5463 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5464 — Topic: Loops
for i in range(10): print(i*i)
# Cell 5465 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 5466 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5467 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5468 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5469 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 5470 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5471 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5472 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5473 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5474 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5475 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 5476 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5477 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5478  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5479 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5480 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 5481 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5482  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5483 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5484 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5485 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5486 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5487 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 5488 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5489 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5490 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5491 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5492  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5493 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5494 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5495 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5496  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5497 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5498 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5499 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5500 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5501 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 5502 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5503 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5504 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5505 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5506  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5507 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5508 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5509 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5510 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5511 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5512  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5513 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5514 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5515 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5516 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5517 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5518 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5519 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 5520  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5521 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5522 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5523  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5524 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5525 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5526 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5527 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5528  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5529 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5530 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5531 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5532  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5533  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5534 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5535 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5536 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5537 — Topic: Loops
for i in range(10): print(i*i)
# Cell 5538 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5539 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5540  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5541 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5542 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5543 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5544 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5545 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5546 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5547 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5548  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5549 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5550 — Topic: Loops
for i in range(10): print(i*i)
# Cell 5551 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5552 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5553 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5554 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5555 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5556 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 5557 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5558 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5559 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5560 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5561 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5562 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5563 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5564 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5565 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5566 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5567 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5568 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5569 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5570 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5571 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5572 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5573 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5574 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5575 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5576 — Topic: Loops
for i in range(10): print(i*i)
# Cell 5577 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5578 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5579 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5580  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5581 — Topic: Loops
for i in range(10): print(i*i)
# Cell 5582 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5583 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5584 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5585 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5586 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5587 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5588  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5589 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5590  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5591  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5592 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5593 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5594 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5595 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5596 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 5597 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5598 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 5599 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5600 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5601 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5602 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5603 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5604 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5605 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5606 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5607 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5608 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5609 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5610 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5611 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5612 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5613 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5614  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5615 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5616 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5617 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 5618 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5619 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5620 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5621  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5622 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 5623 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5624  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5625 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 5626 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5627 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5628  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5629 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5630 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5631 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5632  Topic: Loops
while True:
    print('Break')
    break
# Cell 5633 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5634  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5635 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5636 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5637 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5638 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5639 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5640 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5641 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5642 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5643 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5644 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5645 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 5646 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5647  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5648 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 5649 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5650 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5651 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5652 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5653 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 5654 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 5655 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 5656 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 5657 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5658 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5659 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5660 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5661 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5662  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5663 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5664 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5665 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5666 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5667 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5668 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5669 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5670 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 5671  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5672  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5673 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 5674  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5675  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5676 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5677 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5678 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5679  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5680 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5681 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5682 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 5683 — Topic: Loops
for i in range(10): print(i*i)
# Cell 5684 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5685 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5686 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5687 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5688  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5689 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5690 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5691 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5692 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5693 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5694 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5695 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5696 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5697 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5698 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5699  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5700  Topic: Loops
while True:
    print('Break')
    break
# Cell 5701 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5702  Topic: Loops
while True:
    print('Break')
    break
# Cell 5703 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5704 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5705 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5706 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5707 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 5708 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5709 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5710  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5711 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5712  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5713 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5714 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5715 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5716 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5717 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5718 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5719 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5720 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5721 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5722 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5723 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5724 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5725 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5726 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5727 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5728 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5729 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5730 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5731 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5732  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5733 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5734 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5735 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5736 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5737 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5738 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5739 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5740 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5741 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5742  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5743 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5744 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5745 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5746 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5747 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5748 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5749 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5750 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5751 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5752  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5753 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5754 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5755 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5756  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5757  Topic: Loops
while True:
    print('Break')
    break
# Cell 5758 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 5759 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5760 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5761 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5762 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5763  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5764 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5765 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5766 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5767  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5768 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 5769 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5770 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 5771 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5772 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5773  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5774  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5775 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5776 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5777  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5778 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5779 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5780 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5781 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5782 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 5783  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5784 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5785 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5786  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5787 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5788 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5789  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5790 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5791 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5792 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5793 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5794 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5795 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5796 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 5797 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5798 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5799 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5800 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5801 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5802 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5803 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5804 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5805 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5806 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5807 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5808  Topic: Loops
while True:
    print('Break')
    break
# Cell 5809 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 5810  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5811 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5812  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5813  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5814 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5815  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5816 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5817  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5818 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5819 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5820 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5821 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5822 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5823 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5824  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5825 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5826 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5827 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5828 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5829 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5830 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5831  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5832 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5833 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5834  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5835 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5836 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5837 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 5838  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5839 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 5840 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5841 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5842  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5843 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5844 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5845 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5846 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5847 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5848  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5849 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5850 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5851  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5852 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5853 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5854  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5855 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5856 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5857 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5858 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5859 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5860 — Topic: Loops
for i in range(10): print(i*i)
# Cell 5861  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5862 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5863 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5864 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5865 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5866  Topic: Loops
while True:
    print('Break')
    break
# Cell 5867 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5868 — Topic: Loops
for i in range(10): print(i*i)
# Cell 5869 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5870 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5871  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5872 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5873 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5874 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5875 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5876 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5877 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5878 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5879 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 5880 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5881 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5882 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 5883 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5884 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5885 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5886 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5887 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5888 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5889 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5890 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5891 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5892  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5893 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5894 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5895 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5896 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5897 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5898 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5899 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5900 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5901 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5902 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5903 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5904 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5905 — Topic: Loops
for i in range(10): print(i*i)
# Cell 5906 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5907 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 5908 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5909 — Topic: Loops
for i in range(10): print(i*i)
# Cell 5910 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5911 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5912 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5913 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5914 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5915 — Topic: Loops
for i in range(10): print(i*i)
# Cell 5916 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5917 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5918 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5919  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5920 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5921 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5922  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5923 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 5924  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5925 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5926 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5927 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5928  Topic: Loops
while True:
    print('Break')
    break
# Cell 5929 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5930  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5931  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 5932 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5933 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5934 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5935 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5936 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5937 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5938 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 5939 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5940 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5941 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5942 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5943 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5944 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5945 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 5946 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 5947  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5948 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5949 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5950 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 5951 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5952 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 5953 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5954 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5955 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5956 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5957  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5958 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 5959 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 5960 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 5961 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5962 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5963 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 5964  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 5965 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 5966 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5967 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 5968 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 5969 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5970 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 5971 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5972 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5973 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5974 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5975 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 5976 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 5977 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5978 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5979 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 5980  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5981 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 5982 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5983 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 5984 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 5985 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 5986 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 5987 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 5988 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5989 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5990 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 5991 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 5992  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 5993 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 5994 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 5995 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 5996 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 5997  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 5998  Topic: Loops
while True:
    print('Break')
    break
# Cell 5999 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6000 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6001 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6002 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 6003 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6004 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6005 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6006 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6007 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6008 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6009 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6010 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6011 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6012 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6013 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6014 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6015  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 6016 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6017 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6018 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 6019 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6020 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6021 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6022 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6023 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 6024 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6025 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6026 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6027 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6028 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 6029 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6030 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6031 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6032 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6033 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6034  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 6035 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6036 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6037 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6038 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6039 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6040 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6041 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6042 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6043 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6044 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6045 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6046 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6047 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6048 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 6049 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6050  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6051 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6052 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6053 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6054  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 6055 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6056  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6057 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6058 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6059 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6060 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6061 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6062 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6063  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6064  Topic: Loops
while True:
    print('Break')
    break
# Cell 6065 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6066  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6067 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6068  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6069 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6070 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6071 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6072 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6073 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6074 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6075 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6076 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6077 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6078 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6079 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6080 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6081 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 6082 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6083 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 6084 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6085 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6086  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6087 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 6088 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6089 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6090  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 6091 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6092  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 6093 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6094  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6095 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6096 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6097 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6098 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6099 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6100 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6101  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6102 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 6103 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6104 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6105 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6106 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6107 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6108 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 6109 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6110  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6111 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6112 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6113 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6114 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6115 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6116 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 6117 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6118 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6119 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6120 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 6121 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6122 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6123 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6124 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6125 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6126  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6127 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6128 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6129 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6130 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6131 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6132 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6133  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6134 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6135 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6136 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6137 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6138 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6139 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6140  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6141 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6142 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6143 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6144 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6145 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 6146 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6147 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6148 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6149 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6150 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6151 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6152 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6153  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6154 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6155 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6156 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 6157  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 6158 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6159 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 6160 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 6161 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 6162 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6163 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 6164 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6165 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6166 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6167  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6168 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6169 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6170 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6171  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6172 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6173 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6174  Topic: Loops
while True:
    print('Break')
    break
# Cell 6175 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6176 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6177 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6178 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6179 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6180 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6181 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6182 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6183 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6184 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6185 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6186 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6187 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6188 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6189 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6190 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6191 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6192 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6193  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6194  Topic: Loops
while True:
    print('Break')
    break
# Cell 6195 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6196  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6197  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6198 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6199 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 6200  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6201 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6202 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6203 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6204 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6205 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6206 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6207 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 6208 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6209  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6210 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6211 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6212 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 6213 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6214  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 6215 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6216 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6217 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6218  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6219 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6220 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6221 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 6222 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6223  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6224 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 6225 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 6226 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6227  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6228  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6229 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6230 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 6231 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6232  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6233 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 6234  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6235 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6236 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 6237 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 6238 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6239 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6240 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6241 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6242 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6243  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6244 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6245 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6246  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6247 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6248 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6249 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6250 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6251 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 6252 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6253 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6254 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6255 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 6256 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6257  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6258 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6259 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6260 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6261 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6262 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6263 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6264  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6265 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6266  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6267 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6268 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6269 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6270 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6271 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6272 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6273 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6274 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6275 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6276 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6277  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6278 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6279 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6280 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 6281 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6282 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 6283 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6284 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6285 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 6286 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6287 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6288 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6289 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6290 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6291 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6292 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6293 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6294 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6295 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6296  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6297 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6298 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6299  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6300 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6301 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6302 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6303 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6304 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6305 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6306 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6307 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6308 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6309 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6310  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6311 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6312 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6313  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 6314 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6315 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 6316 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6317 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 6318 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6319 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6320 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 6321 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6322 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6323 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 6324 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6325 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6326 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6327 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6328 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6329 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6330 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6331  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 6332 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6333  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6334 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6335 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6336 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6337 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6338 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6339  Topic: Loops
while True:
    print('Break')
    break
# Cell 6340  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6341 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6342 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 6343 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6344 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6345 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6346 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6347 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6348 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6349 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6350 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6351 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6352 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6353 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6354  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6355 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6356 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6357 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6358 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 6359  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6360 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6361 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6362 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6363 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6364 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6365 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6366 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6367 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6368 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6369  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6370  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 6371 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6372 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 6373 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6374 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 6375 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6376 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6377 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6378 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6379  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6380 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6381  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6382 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6383 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 6384 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 6385 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 6386  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6387 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6388 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6389 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6390  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6391 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6392 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6393 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 6394 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6395  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6396  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6397 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6398 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6399 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6400 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6401 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6402 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6403 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6404  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6405 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6406  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6407 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6408 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 6409 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6410 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 6411 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 6412 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6413 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6414 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6415 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6416  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6417 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6418 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6419 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6420  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6421 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6422 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6423 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6424 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6425 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6426  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6427 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6428 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6429 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6430 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6431 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6432  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6433 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 6434 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6435  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6436 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6437 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6438 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 6439 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6440  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6441  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6442 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6443 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6444 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 6445 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6446 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 6447  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 6448 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6449 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6450 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 6451 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6452 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6453 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6454 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6455 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 6456 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6457 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6458 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6459 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6460 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6461  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6462 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6463 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6464  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6465 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6466  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6467 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 6468 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6469  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6470 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6471  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6472 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6473 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6474 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6475 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6476  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6477 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6478 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6479 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6480  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6481 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6482 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6483 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6484 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6485 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6486 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 6487 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 6488 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6489 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6490  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6491 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6492 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6493 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 6494 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6495 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6496 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6497 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6498 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6499  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6500 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6501 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 6502 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6503  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6504 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6505 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6506 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6507 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6508  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6509 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6510 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 6511 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 6512 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6513  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6514 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 6515 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6516 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 6517 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6518 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6519 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6520 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6521 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6522 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6523 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6524 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 6525 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6526 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6527 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6528 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 6529 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 6530 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6531  Topic: Loops
while True:
    print('Break')
    break
# Cell 6532 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6533  Topic: Loops
while True:
    print('Break')
    break
# Cell 6534 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6535 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 6536  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6537 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6538 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 6539 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6540 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6541 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6542  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6543 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6544 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6545 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6546 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6547  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6548 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6549  Topic: Loops
while True:
    print('Break')
    break
# Cell 6550 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 6551 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6552 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 6553 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6554 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 6555 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6556 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6557 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 6558 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6559 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6560 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6561 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6562 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6563  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6564 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6565 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6566 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6567 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 6568 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6569 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6570 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6571  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6572 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 6573 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 6574  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6575 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6576 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6577 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6578 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6579 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6580 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 6581 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6582 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6583  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6584 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6585  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6586 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 6587 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6588  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 6589 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6590 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6591 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 6592  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6593  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6594  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 6595  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6596  Topic: Loops
while True:
    print('Break')
    break
# Cell 6597 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6598 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6599 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6600 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6601 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6602 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6603  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 6604 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6605 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6606 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6607 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6608  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6609 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6610 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6611 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6612  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6613 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6614 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6615 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 6616 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6617 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6618 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6619 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 6620 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6621 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6622 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6623 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6624 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6625 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 6626  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6627 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6628 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6629 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6630 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 6631  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6632 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6633 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6634  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6635 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6636 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6637 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6638 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6639 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6640 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6641  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6642 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6643  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6644 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6645 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6646 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6647 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6648 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6649 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6650 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6651  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6652 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6653 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6654 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6655  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6656 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6657 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6658 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6659  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6660  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6661  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6662 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6663 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6664  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6665 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6666 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6667  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6668 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 6669 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6670 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 6671 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6672 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6673 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 6674 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 6675 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6676 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6677 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6678 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6679 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6680  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6681 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6682 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 6683 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6684 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6685 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6686 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6687 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 6688 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 6689  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 6690 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6691 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6692 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6693 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6694 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6695 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6696 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6697 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6698 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6699 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6700 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 6701 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6702  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6703 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6704 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6705  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6706 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6707 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 6708 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6709 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 6710 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6711 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6712 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 6713 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6714 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6715 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6716 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6717 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 6718 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6719 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6720 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6721 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6722 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 6723 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6724 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6725 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6726 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6727 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6728 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6729 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6730 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6731 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 6732 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6733 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6734 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6735 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6736 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6737 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6738  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6739 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6740 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 6741 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6742 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6743 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6744 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6745 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6746  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6747  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6748  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6749  Topic: Loops
while True:
    print('Break')
    break
# Cell 6750 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 6751 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6752 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6753 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 6754  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6755 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6756 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6757 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6758 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6759 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6760 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6761  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6762 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6763 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 6764 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6765 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6766 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6767 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6768 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6769 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6770 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6771 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6772 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6773 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6774 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6775 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6776 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 6777 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 6778 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6779 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6780 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6781 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 6782 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6783  Topic: Loops
while True:
    print('Break')
    break
# Cell 6784 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6785 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6786 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6787  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6788 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 6789 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6790 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6791  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 6792 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6793 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6794  Topic: Loops
while True:
    print('Break')
    break
# Cell 6795 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6796 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6797 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 6798 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6799 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6800 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6801 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6802 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6803 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6804 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 6805 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6806 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6807  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6808 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6809 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6810 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6811 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6812 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6813  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 6814  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 6815 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6816 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6817 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6818 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6819 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6820 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6821 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6822 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6823 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6824  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6825 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 6826 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6827 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6828  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6829 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6830 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6831 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6832 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 6833 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6834 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6835 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 6836 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6837 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6838  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6839  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6840 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6841  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 6842 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6843 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6844 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 6845 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6846 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 6847 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6848 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 6849 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6850  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6851 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6852 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6853 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6854  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6855 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6856 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 6857 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6858 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6859  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 6860 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6861 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6862 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6863 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6864 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6865 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6866 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6867 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6868 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6869 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6870 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6871  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6872 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6873 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6874 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6875 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6876 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6877 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6878 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6879 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6880 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6881 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6882  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6883 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6884 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6885  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6886  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6887 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6888 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6889 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6890  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6891  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6892 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6893 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6894 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 6895 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6896 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6897 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 6898 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6899 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6900 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 6901 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6902  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6903 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 6904 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6905 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6906 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6907 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6908 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6909 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6910 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6911  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6912 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6913  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6914 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6915  Topic: Loops
while True:
    print('Break')
    break
# Cell 6916 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6917  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6918 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6919  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6920 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6921 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6922 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6923 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 6924 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6925 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6926  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6927 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6928  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6929 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6930  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6931 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6932 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6933 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6934 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6935  Topic: Loops
while True:
    print('Break')
    break
# Cell 6936  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6937 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 6938 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6939 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6940 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 6941 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6942 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6943 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6944 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6945 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6946  Topic: Loops
while True:
    print('Break')
    break
# Cell 6947 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6948 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6949 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6950 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 6951  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6952 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 6953 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6954 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6955 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6956 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6957 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6958  Topic: Loops
while True:
    print('Break')
    break
# Cell 6959 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6960 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6961 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 6962 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6963 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 6964 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 6965 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6966  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 6967 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 6968 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6969 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 6970  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6971 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 6972 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6973 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6974  Topic: Loops
while True:
    print('Break')
    break
# Cell 6975 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 6976 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 6977 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6978  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 6979 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6980 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 6981 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 6982 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 6983 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6984  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 6985 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 6986  Topic: Loops
while True:
    print('Break')
    break
# Cell 6987 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6988 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6989 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 6990  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 6991 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 6992 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 6993 — Topic: Loops
for i in range(10): print(i*i)
# Cell 6994 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6995 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6996 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 6997 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 6998 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 6999 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7000 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7001  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 7002 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7003 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7004 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7005 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7006 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7007 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7008 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7009 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7010  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 7011 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7012 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 7013 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7014  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7015 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7016 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7017 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7018 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7019 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7020 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7021 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7022  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7023 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7024 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7025 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7026 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7027 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7028 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7029  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7030 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7031 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7032 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7033 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7034 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7035 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7036 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7037 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7038 — Topic: Loops
for i in range(10): print(i*i)
# Cell 7039 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7040 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7041 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7042  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 7043 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7044 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7045 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7046 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7047 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7048 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7049  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7050 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7051  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7052 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7053 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7054 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7055 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7056 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7057 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7058  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7059 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7060 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7061 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7062 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7063 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 7064 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7065  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 7066 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 7067 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7068 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7069 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7070 — Topic: Loops
for i in range(10): print(i*i)
# Cell 7071 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7072 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7073 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7074 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7075 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7076 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7077  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7078 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7079 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7080 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7081 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7082 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7083 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7084 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7085 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7086 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 7087 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7088  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7089 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7090 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7091 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7092 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7093 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7094  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7095 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7096 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7097 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7098 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7099 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7100 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7101  Topic: Loops
while True:
    print('Break')
    break
# Cell 7102 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7103 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 7104 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7105 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7106 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7107 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7108 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7109  Topic: Loops
while True:
    print('Break')
    break
# Cell 7110 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7111 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7112 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7113  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7114 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7115  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7116  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7117 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7118  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7119 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7120 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7121 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7122 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7123 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7124 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7125 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7126 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7127 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7128  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7129 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7130  Topic: Loops
while True:
    print('Break')
    break
# Cell 7131 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7132 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7133  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7134 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7135 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7136  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7137 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7138  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7139 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7140 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7141 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7142 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7143  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7144  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7145 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7146 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 7147 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7148  Topic: Loops
while True:
    print('Break')
    break
# Cell 7149 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7150 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7151 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7152 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7153  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7154 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7155 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7156 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7157 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7158 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7159 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7160 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7161 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7162 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7163 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7164  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7165 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7166 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7167 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7168 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7169 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7170 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7171 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7172 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7173  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7174 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7175 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7176 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7177 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7178 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7179 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7180 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7181 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7182 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7183 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7184  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7185 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7186 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7187  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7188 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7189  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7190 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7191 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7192 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7193 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7194  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7195 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7196 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7197 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7198 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7199 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7200 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7201 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7202 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7203 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7204 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7205  Topic: Loops
while True:
    print('Break')
    break
# Cell 7206  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7207 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7208 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7209 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7210 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7211 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7212 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7213 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7214 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7215 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7216  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 7217 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7218  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 7219 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7220 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7221 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7222 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7223 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7224 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7225  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7226 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7227 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7228 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7229 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7230 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7231 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7232  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7233 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7234 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7235  Topic: Loops
while True:
    print('Break')
    break
# Cell 7236 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7237 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7238 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7239 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7240 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7241 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7242 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7243 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7244  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 7245 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7246 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7247 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7248  Topic: Loops
while True:
    print('Break')
    break
# Cell 7249 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7250 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7251 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7252 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7253 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7254 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7255 — Topic: Loops
for i in range(10): print(i*i)
# Cell 7256 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7257 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7258 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7259 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7260 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7261 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7262 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7263 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7264 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7265 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7266 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7267 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7268 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7269 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7270 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7271 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7272 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7273 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7274 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7275 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7276 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7277 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7278 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7279 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7280 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7281 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7282  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 7283 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 7284 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7285 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7286 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7287 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7288 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7289 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7290  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 7291 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7292 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7293 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7294 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7295 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7296  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7297 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7298 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7299 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7300 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7301  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7302  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7303 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7304 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7305 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7306 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7307 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7308 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7309  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7310  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7311 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7312 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7313 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7314 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7315 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7316  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7317 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7318 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7319 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7320 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7321  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 7322 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7323 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7324 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7325 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7326 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7327 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7328 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7329 — Topic: Loops
for i in range(10): print(i*i)
# Cell 7330 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7331 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7332 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7333 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7334 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7335 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7336 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7337  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7338 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7339 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7340  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7341 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7342 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7343  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 7344 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7345 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7346 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7347 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7348 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7349 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7350 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7351  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7352 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7353 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7354 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7355 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7356 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7357 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7358 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7359 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7360 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7361 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7362 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7363 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7364  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 7365 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7366 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7367 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7368 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7369 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7370 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7371 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7372 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7373 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7374 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7375 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7376 — Topic: Loops
for i in range(10): print(i*i)
# Cell 7377 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7378 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7379 — Topic: Loops
for i in range(10): print(i*i)
# Cell 7380 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7381 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7382 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7383 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7384  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7385 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7386  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7387 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7388 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7389 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7390 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7391  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7392 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7393 — Topic: Loops
for i in range(10): print(i*i)
# Cell 7394 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7395 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7396  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7397  Topic: Loops
while True:
    print('Break')
    break
# Cell 7398  Topic: Loops
while True:
    print('Break')
    break
# Cell 7399 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7400  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7401 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7402 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7403 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7404 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7405 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 7406 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7407 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7408 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7409  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7410  Topic: Loops
while True:
    print('Break')
    break
# Cell 7411 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7412  Topic: Loops
while True:
    print('Break')
    break
# Cell 7413  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7414 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7415  Topic: Loops
while True:
    print('Break')
    break
# Cell 7416 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7417 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 7418 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7419 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7420 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7421 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7422 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7423 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7424 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7425 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7426 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7427 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7428 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7429 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7430 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7431 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7432  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7433  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7434 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7435 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7436 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7437 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7438  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 7439 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7440 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7441  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7442 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7443 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7444 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7445 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7446  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 7447  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7448 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7449 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7450 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7451 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7452 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7453 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7454 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7455 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7456  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7457 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7458 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 7459 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7460 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7461 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7462 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7463 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7464 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7465 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7466 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7467 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7468  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7469 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7470 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7471 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7472  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7473 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7474 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7475 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7476  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7477 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7478 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7479 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7480 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7481  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 7482 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7483 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7484 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7485 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7486  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7487 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7488 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7489 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7490  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7491  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 7492 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7493 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7494 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7495 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7496 — Topic: Loops
for i in range(10): print(i*i)
# Cell 7497 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7498  Topic: Loops
while True:
    print('Break')
    break
# Cell 7499 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7500 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7501 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7502 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7503 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7504 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7505  Topic: Loops
while True:
    print('Break')
    break
# Cell 7506 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7507 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7508 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7509 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7510  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 7511 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7512  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 7513 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7514 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7515 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7516 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7517 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7518 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7519  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 7520 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7521  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7522 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7523 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7524  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7525 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7526  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7527 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7528 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7529 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7530  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 7531  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7532 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7533 — Topic: Loops
for i in range(10): print(i*i)
# Cell 7534 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7535 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7536 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7537 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7538 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7539 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7540 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7541 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7542 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7543 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7544 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7545 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7546 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7547 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7548 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7549 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7550 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7551 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7552 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7553 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7554 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7555 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7556 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7557 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7558  Topic: Loops
while True:
    print('Break')
    break
# Cell 7559 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7560 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7561 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7562 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7563 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7564 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7565 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7566 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7567 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7568 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7569 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7570  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 7571 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7572 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7573 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7574 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7575 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7576 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7577 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7578 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7579 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 7580 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7581 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7582 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7583  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7584  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 7585  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7586 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7587 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7588 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7589  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7590  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7591 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7592  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 7593 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7594 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7595 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7596 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7597 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7598 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7599 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7600 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7601 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7602 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7603 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7604  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 7605 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7606 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7607 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7608 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7609 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7610  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7611 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7612 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7613 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7614 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7615 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7616 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7617 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7618 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7619 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7620 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7621  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7622 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7623 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7624 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7625 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7626  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7627 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7628 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7629 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7630 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7631 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 7632 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7633 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7634 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7635 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7636 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7637 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7638 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7639 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7640 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7641 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7642 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7643  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7644 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7645  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7646 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7647  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 7648 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7649 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7650 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7651 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7652 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7653 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7654  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 7655 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7656 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7657 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7658 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7659 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7660 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 7661 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7662 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7663 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7664 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7665  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7666 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7667 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7668 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7669 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7670 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7671 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7672 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7673 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7674 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7675 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7676 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7677 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7678  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7679  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7680  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7681 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7682 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7683  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7684 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7685 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7686 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7687 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7688 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7689 — Topic: Loops
for i in range(10): print(i*i)
# Cell 7690  Topic: Loops
while True:
    print('Break')
    break
# Cell 7691 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7692 — Topic: Loops
for i in range(10): print(i*i)
# Cell 7693 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7694 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7695 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7696 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7697  Topic: Loops
while True:
    print('Break')
    break
# Cell 7698  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 7699 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7700 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7701 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7702 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7703 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7704 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7705 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7706 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7707 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7708 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7709  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7710 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7711 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7712 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7713 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7714 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7715 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7716 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7717 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7718 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7719 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7720 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7721 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7722  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7723 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7724 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7725 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7726 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7727 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7728 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7729  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 7730 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7731 — Topic: Loops
for i in range(10): print(i*i)
# Cell 7732 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7733 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7734 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7735 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7736 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7737 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7738 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7739 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7740 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7741 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7742 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7743  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7744 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7745 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7746  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7747 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7748 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7749 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7750 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7751 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7752 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7753 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7754  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 7755 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7756  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 7757  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7758 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7759 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7760 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7761  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7762 — Topic: Loops
for i in range(10): print(i*i)
# Cell 7763 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7764 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7765 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7766 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7767  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7768 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7769 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7770  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7771 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7772 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7773 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7774 — Topic: Loops
for i in range(10): print(i*i)
# Cell 7775 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7776 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 7777 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7778 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7779 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7780 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7781 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7782 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7783 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7784 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7785 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7786 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7787 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7788 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7789 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7790 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7791 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7792 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7793  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7794 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7795 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7796 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7797 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7798  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7799 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7800  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 7801 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7802  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7803  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 7804 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7805 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7806  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 7807  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7808  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7809  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7810  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7811 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7812  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7813  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 7814 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7815 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7816  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7817 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7818 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7819 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7820 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7821 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7822 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7823 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7824 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7825 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7826 — Topic: Loops
for i in range(10): print(i*i)
# Cell 7827 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7828 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7829 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7830 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7831 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7832 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7833 — Topic: Loops
for i in range(10): print(i*i)
# Cell 7834 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7835  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 7836  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 7837 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7838 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7839 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7840 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7841 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7842 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7843 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7844  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7845 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7846 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7847 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7848  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7849 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7850  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7851 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7852 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7853  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7854 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7855 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7856 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7857  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 7858  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7859 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7860 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7861 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7862 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7863 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7864 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7865 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7866 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7867 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7868 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7869 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7870 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7871 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7872 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7873 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7874 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7875 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7876 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7877 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7878 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7879 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7880 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7881 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7882 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 7883 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7884 — Topic: Loops
for i in range(10): print(i*i)
# Cell 7885 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7886 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 7887 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7888 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7889 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7890 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7891 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7892 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7893  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 7894 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7895 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7896 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7897 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7898 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7899 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7900 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7901  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7902 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7903 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7904 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7905 — Topic: Loops
for i in range(10): print(i*i)
# Cell 7906 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7907 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7908  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7909 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 7910 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7911 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7912  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7913 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7914 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 7915  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7916 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7917 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7918 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7919 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7920  Topic: Loops
while True:
    print('Break')
    break
# Cell 7921 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7922 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7923  Topic: Loops
while True:
    print('Break')
    break
# Cell 7924 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7925 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7926 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7927 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7928 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 7929 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7930 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 7931  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7932 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7933 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7934 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 7935 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7936 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7937 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7938 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7939 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7940 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7941 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7942 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7943 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7944 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7945 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7946 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7947  Topic: Loops
while True:
    print('Break')
    break
# Cell 7948 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7949 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 7950 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7951 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7952 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7953 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7954 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7955 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 7956 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 7957 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7958 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7959 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 7960 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 7961 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7962 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7963 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7964 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7965  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 7966  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7967  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7968 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7969 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7970 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7971 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7972 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7973 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7974 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7975 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 7976 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7977 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7978 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 7979 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 7980 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7981 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 7982 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 7983 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7984 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 7985 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 7986 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 7987 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 7988 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 7989 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7990 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 7991  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 7992  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 7993 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 7994 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7995 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7996 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 7997 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 7998 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 7999 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8000 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 8001  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8002  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8003 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8004 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8005 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8006 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8007 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8008 — Topic: Loops
for i in range(10): print(i*i)
# Cell 8009 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8010 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8011 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8012 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8013 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 8014 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8015 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8016 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8017  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8018  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8019 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8020 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8021  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8022  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8023 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8024 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8025  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8026 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8027 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8028 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8029 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8030 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8031 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8032 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8033 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 8034  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8035 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8036 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8037 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8038 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8039 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8040 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8041  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8042 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8043 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8044 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8045  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8046 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8047  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8048 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8049 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8050 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8051 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8052 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8053  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8054 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8055  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8056 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8057 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 8058 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 8059 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8060  Topic: Loops
while True:
    print('Break')
    break
# Cell 8061 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8062 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8063 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8064 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8065 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 8066 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 8067 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8068 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8069  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8070  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8071  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8072 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8073 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 8074  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 8075 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8076  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8077 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8078  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8079 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8080  Topic: Loops
while True:
    print('Break')
    break
# Cell 8081  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8082 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8083  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8084 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8085 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 8086 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8087 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8088  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8089 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8090 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8091 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8092 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8093 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8094 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8095  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8096 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8097 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8098  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8099 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8100  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8101 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8102 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 8103 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8104 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8105  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8106  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8107 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8108 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8109  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8110  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8111 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8112 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8113 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8114 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8115  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8116 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8117 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8118 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8119 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 8120 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 8121 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8122 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8123 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8124 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8125 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8126  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8127  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8128  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8129 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8130 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8131 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8132 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8133 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 8134 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8135  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 8136 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8137 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8138 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 8139 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8140 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8141 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 8142  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8143 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8144 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8145 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8146 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8147 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8148 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8149 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8150 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8151 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 8152 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8153 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8154  Topic: Loops
while True:
    print('Break')
    break
# Cell 8155 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8156 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 8157  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8158  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8159 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8160 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8161 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8162  Topic: Loops
while True:
    print('Break')
    break
# Cell 8163 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8164 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 8165 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8166 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8167  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 8168 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8169 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 8170 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8171  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 8172  Topic: Loops
while True:
    print('Break')
    break
# Cell 8173 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8174 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8175 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 8176 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8177 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8178 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8179 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8180  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8181 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8182 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8183 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8184 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8185 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8186 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8187  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8188 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8189 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8190 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8191 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8192 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8193 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8194 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 8195 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 8196 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8197  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8198 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8199 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8200  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8201 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8202 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8203 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8204 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 8205 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8206 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 8207 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8208  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8209 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8210 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8211 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8212 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8213 — Topic: Loops
for i in range(10): print(i*i)
# Cell 8214 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 8215 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8216 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 8217 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8218 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8219 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8220 — Topic: Loops
for i in range(10): print(i*i)
# Cell 8221 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8222 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8223 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 8224 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8225 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8226 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8227 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8228 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 8229  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8230  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8231 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8232 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8233 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8234 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8235 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8236  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8237 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8238 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 8239 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8240 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8241  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8242 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 8243 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8244  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 8245  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 8246 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8247 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8248 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8249 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8250 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8251 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8252 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8253 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8254 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8255 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8256 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8257 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8258  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8259  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8260 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8261 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8262  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8263 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8264 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8265 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8266 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 8267 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8268  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8269 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8270 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 8271  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8272 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8273 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8274 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8275  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8276 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 8277 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8278  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8279 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8280 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8281 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8282 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8283 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8284 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 8285 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8286 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8287 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8288 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8289 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8290 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8291 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8292 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8293 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8294 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8295 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 8296 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8297 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8298  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8299 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8300 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 8301 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8302 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8303 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8304 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8305 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8306 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8307 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8308 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8309 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8310  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8311  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 8312 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8313  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 8314 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8315 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8316 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8317 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 8318 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8319  Topic: Loops
while True:
    print('Break')
    break
# Cell 8320  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8321 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 8322 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8323 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8324 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8325 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8326 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8327  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8328 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8329 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8330 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8331  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8332 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 8333 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8334 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8335 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 8336 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 8337 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 8338  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8339 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8340 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8341 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8342 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8343 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8344 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8345 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8346 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8347 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8348 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8349 — Topic: Loops
for i in range(10): print(i*i)
# Cell 8350 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8351 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8352 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 8353 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8354 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8355 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8356  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8357  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8358 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8359 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8360 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8361 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8362 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8363  Topic: Loops
while True:
    print('Break')
    break
# Cell 8364  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8365 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8366 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8367 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 8368 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8369 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8370 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8371 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8372 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8373 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8374 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8375 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8376 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8377  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8378 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8379 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8380 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8381 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8382 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8383 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8384 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8385 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8386 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8387 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8388 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8389 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8390 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8391 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8392  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8393 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8394 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8395 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8396  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8397  Topic: Loops
while True:
    print('Break')
    break
# Cell 8398 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8399 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8400 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8401 — Topic: Loops
for i in range(10): print(i*i)
# Cell 8402  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8403 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8404 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8405 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 8406 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8407 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8408 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8409 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8410 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8411 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8412 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 8413 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8414 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8415 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8416  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8417 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 8418 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8419 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8420 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8421 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 8422 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8423 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8424 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8425 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8426 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8427  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8428 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8429 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8430 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8431 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8432  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 8433 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8434 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 8435 — Topic: Loops
for i in range(10): print(i*i)
# Cell 8436  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 8437 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 8438 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8439 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8440 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8441 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 8442 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8443 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8444 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8445 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8446 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8447 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8448 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8449 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8450 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8451  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8452 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8453 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 8454 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 8455 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 8456 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8457 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8458 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8459 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8460 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 8461 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8462 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8463  Topic: Loops
while True:
    print('Break')
    break
# Cell 8464 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8465 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8466  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8467 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8468 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8469  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8470 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8471  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8472 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8473 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8474 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8475 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8476 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8477 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8478 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8479 — Topic: Loops
for i in range(10): print(i*i)
# Cell 8480 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 8481  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8482 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8483  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8484 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8485  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8486  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8487 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8488  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8489  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 8490 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8491 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8492 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8493 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8494 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8495 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 8496 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8497  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8498 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 8499  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8500 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 8501 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8502 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8503  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8504 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8505  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8506 — Topic: Loops
for i in range(10): print(i*i)
# Cell 8507 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8508 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 8509 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8510 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8511 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8512 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 8513 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8514 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8515  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8516 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8517  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8518 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8519 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8520 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8521 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8522  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 8523  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8524 — Topic: Loops
for i in range(10): print(i*i)
# Cell 8525  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8526 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8527 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8528  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8529 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8530 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8531 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8532 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8533 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8534 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8535  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8536 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 8537  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8538 — Topic: Loops
for i in range(10): print(i*i)
# Cell 8539  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8540 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8541 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8542 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 8543  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8544 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8545 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8546  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8547  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8548 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8549 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8550 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8551 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8552 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8553 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8554 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8555  Topic: Loops
while True:
    print('Break')
    break
# Cell 8556  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8557 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8558  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8559 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8560 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8561 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8562 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8563 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8564 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8565 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8566 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8567 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8568 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8569 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8570 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8571 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8572 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8573  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8574 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8575 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8576 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8577 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8578 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8579  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8580 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 8581 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 8582 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8583 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8584 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8585  Topic: Loops
while True:
    print('Break')
    break
# Cell 8586 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8587 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8588 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8589 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8590 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8591 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8592 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8593 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8594 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8595 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8596 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8597 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8598 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8599 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8600 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 8601 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 8602 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8603 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8604 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8605 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8606 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8607 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8608  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8609 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8610 — Topic: Loops
for i in range(10): print(i*i)
# Cell 8611 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 8612 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8613 — Topic: Loops
for i in range(10): print(i*i)
# Cell 8614 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8615 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 8616 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8617 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8618 — Topic: Loops
for i in range(10): print(i*i)
# Cell 8619 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8620 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8621  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8622 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8623  Topic: Loops
while True:
    print('Break')
    break
# Cell 8624 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8625 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8626 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8627 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8628 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8629 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8630 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8631 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8632 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8633 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8634 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8635 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8636 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8637 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8638 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 8639 — Topic: Loops
for i in range(10): print(i*i)
# Cell 8640 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8641 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8642 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8643 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8644 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8645 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 8646 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8647 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8648 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8649  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8650 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8651 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8652 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8653 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8654 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8655 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8656 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8657  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8658 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8659 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8660 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 8661 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8662 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8663 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8664 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8665 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8666  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8667 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8668 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8669  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 8670 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8671  Topic: Loops
while True:
    print('Break')
    break
# Cell 8672 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8673  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8674 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8675 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8676 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8677 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8678 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8679 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8680 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8681 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8682  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 8683  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8684 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8685  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8686 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8687 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8688 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8689  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8690 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8691 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8692 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8693 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8694 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8695 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8696 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8697  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8698 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8699 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8700  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8701 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8702 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8703 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8704 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8705 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8706 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8707 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8708 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 8709 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8710  Topic: Loops
while True:
    print('Break')
    break
# Cell 8711 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8712 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 8713 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8714  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 8715  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8716 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8717 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8718 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8719 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8720 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8721 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8722 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 8723 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8724  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8725 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8726  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8727  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8728 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8729 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8730 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8731 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8732 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8733 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 8734 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8735  Topic: Loops
while True:
    print('Break')
    break
# Cell 8736 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8737 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 8738  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8739 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 8740 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8741 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8742 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 8743 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8744 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8745  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8746 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8747 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8748  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8749  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 8750 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 8751 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8752  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8753 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8754 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8755 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8756 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8757 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 8758 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8759 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8760 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8761  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8762 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8763 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8764  Topic: Loops
while True:
    print('Break')
    break
# Cell 8765 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8766 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8767 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8768 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8769 — Topic: Loops
for i in range(10): print(i*i)
# Cell 8770 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8771  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8772 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8773 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8774 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8775 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 8776 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8777 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8778 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8779 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8780 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 8781 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 8782 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 8783 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 8784 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 8785 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8786 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 8787 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 8788 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8789 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8790 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8791 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8792 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8793  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8794 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8795 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8796 — Topic: Loops
for i in range(10): print(i*i)
# Cell 8797 — Topic: Loops
for i in range(10): print(i*i)
# Cell 8798  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8799 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8800 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8801 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8802 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8803 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 8804 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8805 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8806 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 8807 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8808 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8809 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8810 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8811 — Topic: Loops
for i in range(10): print(i*i)
# Cell 8812 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8813 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8814 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 8815 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8816 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8817 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8818  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 8819 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8820 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8821 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8822 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8823 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 8824 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8825 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 8826 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 8827 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 8828  Topic: Loops
while True:
    print('Break')
    break
# Cell 8829  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8830 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8831 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8832 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8833 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8834 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8835 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8836 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 8837 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8838  Topic: Loops
while True:
    print('Break')
    break
# Cell 8839 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8840 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8841 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 8842 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8843 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8844 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8845  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8846 — Topic: Loops
for i in range(10): print(i*i)
# Cell 8847 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8848 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8849 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8850 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8851 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 8852 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8853 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8854  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8855 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8856 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8857 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8858 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8859 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8860  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 8861 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8862 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 8863 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8864 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8865 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8866  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8867 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8868  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8869  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8870 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8871 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8872  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8873  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8874  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8875 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8876 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8877 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8878 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8879 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8880 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8881 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8882 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8883  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8884 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8885 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8886 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8887 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8888 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8889 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8890 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8891 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8892 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8893 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8894  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8895 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8896 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8897 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 8898 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8899 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8900 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8901 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8902 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8903  Topic: Loops
while True:
    print('Break')
    break
# Cell 8904 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8905 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8906 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 8907 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8908  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8909 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8910 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8911 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8912  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8913  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8914 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8915 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8916 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8917 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8918 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8919 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8920 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8921 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 8922 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8923 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 8924 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 8925 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 8926  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8927 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8928 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8929 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8930  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8931 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8932 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8933 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8934 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8935 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8936 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 8937 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 8938  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 8939 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8940 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8941 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 8942 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8943  Topic: Loops
while True:
    print('Break')
    break
# Cell 8944 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8945  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8946 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 8947 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8948  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8949 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8950 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 8951 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 8952 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8953 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8954  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8955 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8956 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8957 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 8958 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8959  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8960 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8961 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8962 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8963 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8964 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8965 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 8966 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8967 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 8968 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8969 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8970 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 8971  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8972 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8973 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8974 — Topic: Loops
for i in range(10): print(i*i)
# Cell 8975 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 8976 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8977 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 8978 — Topic: Loops
for i in range(10): print(i*i)
# Cell 8979 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 8980 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8981  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 8982 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 8983  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 8984 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 8985 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 8986 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 8987 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 8988 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8989 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8990  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 8991 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 8992 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 8993 — Topic: Loops
for i in range(10): print(i*i)
# Cell 8994 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 8995 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 8996 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 8997 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 8998 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 8999 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9000  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9001 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9002 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9003 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9004 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9005 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9006 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9007 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9008 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9009 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9010 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9011  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9012 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9013 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9014 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9015 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9016 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9017  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9018 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9019 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9020 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9021  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9022 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9023  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9024  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9025  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9026  Topic: Loops
while True:
    print('Break')
    break
# Cell 9027 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9028 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9029 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9030 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9031 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9032 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9033 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9034 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 9035  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9036  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9037  Topic: Loops
while True:
    print('Break')
    break
# Cell 9038 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9039 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9040  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9041 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9042  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9043 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9044  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9045  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9046 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9047 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9048 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9049 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9050 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9051 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9052 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9053 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9054 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9055 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9056 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9057 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9058 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9059 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9060 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9061 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9062 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9063 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9064 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9065 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9066 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9067  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9068 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9069 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9070 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9071 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9072  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 9073 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9074  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9075 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9076 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9077 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9078 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9079 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9080 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9081 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9082 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9083 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9084 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9085 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9086 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9087  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9088 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9089 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9090 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9091 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9092 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9093 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9094 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9095 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9096 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9097 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9098 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9099 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9100 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9101  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9102 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9103  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9104 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9105 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9106 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9107  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9108 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9109  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9110 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9111 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9112 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9113 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9114 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9115  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9116 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9117  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9118 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9119 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9120 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 9121 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 9122 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9123 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9124 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9125 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9126  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9127 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9128  Topic: Loops
while True:
    print('Break')
    break
# Cell 9129 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 9130 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9131 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9132 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9133  Topic: Loops
while True:
    print('Break')
    break
# Cell 9134 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9135 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9136 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9137 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9138 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9139 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9140 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9141 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9142 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9143 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9144 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9145 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9146 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9147 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9148  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9149  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9150 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9151 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9152 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9153 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9154 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9155 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9156 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9157 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9158 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9159 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9160 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9161  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9162 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9163 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9164 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9165 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9166 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9167  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9168 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9169  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9170 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9171 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9172 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9173 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9174 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9175 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9176 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9177 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9178 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9179 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9180 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9181 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9182 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9183  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9184 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9185  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9186 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9187 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9188 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9189 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9190 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9191 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9192 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9193 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9194 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9195 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9196 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9197 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9198 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9199 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9200 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9201  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9202 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9203  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9204 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9205  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9206 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9207 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9208 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9209 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9210 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9211 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9212 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9213 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9214 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9215  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9216 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9217 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9218 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9219 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9220 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9221 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9222 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9223  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9224 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9225 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9226  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9227 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9228 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9229 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9230  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9231  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9232 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 9233 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9234  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9235  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 9236 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9237 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9238 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9239 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9240 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9241 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 9242  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9243 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9244  Topic: Loops
while True:
    print('Break')
    break
# Cell 9245 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9246 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9247  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9248 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9249  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9250 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9251 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9252 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9253 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9254 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9255 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9256 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9257 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9258 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9259 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 9260 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 9261 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9262  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9263 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9264 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9265 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9266 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9267 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9268 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9269 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9270 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9271 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9272 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9273 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9274  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9275 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 9276 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9277  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9278  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9279 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9280 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9281 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9282 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9283  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9284 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9285  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9286  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9287 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9288 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9289 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9290 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9291 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9292  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9293 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9294 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9295 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9296  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9297 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9298 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9299 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9300  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9301 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9302 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9303 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9304 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9305  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9306 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9307 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9308 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9309 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9310 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 9311 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9312  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9313  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9314 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9315 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9316 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9317 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9318 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9319 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9320 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9321  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9322 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9323 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9324 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9325 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 9326 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9327 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9328 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9329 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9330 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9331 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9332 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9333 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9334 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9335 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9336 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9337 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9338 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9339 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9340 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9341 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9342  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9343 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9344  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9345 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9346 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9347 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9348  Topic: Loops
while True:
    print('Break')
    break
# Cell 9349 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9350  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9351 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9352 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9353 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9354 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 9355 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9356  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 9357 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9358 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9359 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9360 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9361 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9362 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9363 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9364 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9365 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9366 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9367 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9368 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9369 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9370  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9371 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9372 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9373 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9374 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9375 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9376 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9377 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9378 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9379 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9380 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9381 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9382 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9383 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9384 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9385 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9386 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9387  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9388 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9389 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9390 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9391 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9392 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9393 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9394 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9395 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9396 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9397 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9398 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9399  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9400 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9401 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9402 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9403 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9404 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9405 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9406 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9407 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 9408 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9409 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9410  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9411 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9412 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9413 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9414  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9415  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9416 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9417  Topic: Loops
while True:
    print('Break')
    break
# Cell 9418 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9419 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9420  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9421 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 9422 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9423 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9424 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9425 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9426 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9427 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9428 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 9429 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9430 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 9431  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 9432 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9433 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9434 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9435 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9436 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9437 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9438 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9439 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9440  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9441 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9442  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9443 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9444 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9445  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9446 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9447 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9448 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9449 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9450 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9451 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9452 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9453 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9454 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 9455 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9456 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9457 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9458 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9459 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9460 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9461 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9462 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9463 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9464 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9465 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9466 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9467 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9468 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9469 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9470 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9471 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9472 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9473 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9474 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9475 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9476 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9477  Topic: Loops
while True:
    print('Break')
    break
# Cell 9478 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9479 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9480 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9481  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9482 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 9483 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9484 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9485 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9486  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9487  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 9488  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9489 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9490 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9491 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9492  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9493 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9494 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9495 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9496 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9497 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9498  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9499 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9500 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9501  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9502  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9503 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9504 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9505  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9506 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9507 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9508 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9509 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9510 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9511 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9512  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9513 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9514 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9515 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9516 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9517 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9518 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9519 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9520 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9521 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9522 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9523 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9524 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9525 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9526 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9527 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9528  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9529 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9530 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9531 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9532  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9533  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9534  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9535 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9536 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9537 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9538 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9539  Topic: Loops
while True:
    print('Break')
    break
# Cell 9540 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9541 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 9542 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9543 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 9544 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9545 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9546 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9547  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9548 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9549 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9550  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9551 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9552 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9553 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9554 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9555 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9556 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9557 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9558 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9559 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9560 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9561 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 9562 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9563 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9564 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9565 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9566  Topic: Loops
while True:
    print('Break')
    break
# Cell 9567 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 9568 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9569 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9570 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9571 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9572  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9573 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9574 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9575 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9576 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9577 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9578  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9579 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9580 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9581 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9582 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9583  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9584 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9585 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9586 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9587 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9588 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9589  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9590 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9591 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9592  Topic: Loops
while True:
    print('Break')
    break
# Cell 9593 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9594 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9595 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9596 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9597  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9598 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9599  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9600 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9601  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9602 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 9603 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9604 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9605 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9606 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9607 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9608 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9609 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9610 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9611 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9612 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9613 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9614 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9615 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9616  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9617 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9618 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9619 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9620 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9621 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9622 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9623 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9624 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9625 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9626 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9627 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9628 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9629  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9630 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9631 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9632 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9633 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9634 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9635 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9636 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9637 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9638 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9639 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9640 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9641 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9642 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9643 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9644 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9645 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9646 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 9647 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9648 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9649 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9650 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9651 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9652 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 9653 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9654 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9655  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 9656 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9657 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9658 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9659 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9660  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9661  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9662  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9663  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 9664 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 9665 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9666 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9667  Topic: Loops
while True:
    print('Break')
    break
# Cell 9668 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9669 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9670 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9671 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9672 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9673 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9674 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9675 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 9676  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9677 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9678 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9679 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9680 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9681 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9682  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9683 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9684  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9685  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9686 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9687 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9688  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9689  Topic: Loops
while True:
    print('Break')
    break
# Cell 9690 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9691 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9692 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9693 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 9694 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9695 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9696 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9697 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 9698 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 9699  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9700 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9701 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9702 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9703 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9704 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9705 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9706 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9707 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9708 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9709 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9710 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9711 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9712 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9713 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9714  Topic: Loops
while True:
    print('Break')
    break
# Cell 9715 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9716 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9717 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9718 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9719 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9720 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9721 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9722  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 9723 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9724  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9725  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9726 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9727 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9728 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9729 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9730 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9731 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9732 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9733 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9734 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9735 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9736  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9737 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9738 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9739 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9740 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9741  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9742 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9743 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9744 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9745  Topic: Loops
while True:
    print('Break')
    break
# Cell 9746 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9747 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9748 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9749 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9750 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9751 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9752 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9753  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9754 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9755 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9756 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 9757 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9758 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9759 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9760 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9761 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9762 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9763 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9764  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9765  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9766 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9767 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9768 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9769 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9770  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9771 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 9772  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9773 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9774 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9775 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9776 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9777 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9778  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9779 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9780 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9781 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9782 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9783 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9784 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9785 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 9786  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9787 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9788 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9789 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9790 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9791 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9792  Topic: Loops
while True:
    print('Break')
    break
# Cell 9793 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9794 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9795  Topic: Loops
while True:
    print('Break')
    break
# Cell 9796 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9797  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9798 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9799 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9800 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9801  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9802 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9803  Topic: Loops
while True:
    print('Break')
    break
# Cell 9804  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9805 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 9806 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9807  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9808 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9809 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9810  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9811 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9812 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9813  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9814 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9815 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9816 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9817 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9818  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9819 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9820 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9821 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9822 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9823  Topic: Loops
while True:
    print('Break')
    break
# Cell 9824 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9825 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9826 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9827 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9828 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9829 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9830  Topic: Loops
while True:
    print('Break')
    break
# Cell 9831 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9832 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9833 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9834 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9835 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9836 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9837 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9838 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9839 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9840  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9841 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9842 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9843 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9844 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9845 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9846 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9847 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9848 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9849 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9850 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9851 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9852 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9853 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9854  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 9855 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9856 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9857 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9858 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9859 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9860 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9861 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9862 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 9863 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9864 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9865 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9866  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9867 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9868 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9869 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9870 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9871 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9872 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9873 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9874  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9875 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9876 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9877 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9878 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9879 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9880 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9881 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9882 — Topic: Lists & Tuples
t = (1, 2, 3)
print(t[0])
# Cell 9883 — Topic: JSON & CSV
import json
data = {'a': 1}
print(json.dumps(data))
# Cell 9884 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9885 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9886  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9887 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9888 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9889 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9890  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 9891 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9892 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9893 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9894 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9895 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9896 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9897  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9898 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9899 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9900 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9901 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9902 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9903 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9904  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9905 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9906 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9907 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9908  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 9909 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9910 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9911 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9912 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9913 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 9914 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9915 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9916  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 9917 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9918  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9919 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9920  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9921 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9922 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9923 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9924 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9925 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9926  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9927 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9928 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9929 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9930 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 9931 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9932 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9933 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9934 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9935 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9936 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9937 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9938 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9939 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9940 — Topic: Basics
name = 'Fahd'
print(f'Hello, {name}')
# Cell 9941 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9942 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9943 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9944 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9945  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9946 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9947 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9948 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9949  Topic: Loops
while True:
    print('Break')
    break
# Cell 9950  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9951 — Topic: File I/O
with open('test.txt', 'r') as f:
    print(f.read())
# Cell 9952  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9953 — Topic: File I/O
with open('test.txt', 'w') as f:
    f.write('Hello World')
# Cell 9954 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9955 — Topic: JSON & CSV
import csv
with open('file.csv', 'w', newline='') as f:
 csv.writer(f).writerow(['a','b','c'])
# Cell 9956 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9957 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9958  Topic: Decorators
def log(func):
 def wrapper():
  print('Call')
  func()
 return wrapper
@log
def say(): print('Hi')
say()
# Cell 9959 — Topic: Basic ML
from sklearn.linear_model import LinearRegression
model = LinearRegression()
print(model)
# Cell 9960 — Topic: Functions
def greet(name='User'):
    print(f'Hi, {name}')
greet()
# Cell 9961 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9962 — Topic: Loops
for i in range(10): print(i*i)
# Cell 9963 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9964 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 9965 — Topic: Web Scraping
import requests
from bs4 import BeautifulSoup
r = requests.get('https://example.com')
soup = BeautifulSoup(r.text, 'html.parser')
print(soup.title.text)
# Cell 9966 — Topic: NumPy
import numpy as np
print(np.linspace(0, 1, 5))
# Cell 9967 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9968 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9969 — Topic: Pandas
import pandas as pd
df = pd.read_csv('file.csv')
print(df.head())
# Cell 9970 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9971  Topic: Sorting Algorithms
# Bubble sort
def bubble(arr):
 for i in range(len(arr)):
  for j in range(0, len(arr)-i-1):
   if arr[j]>arr[j+1]: arr[j],arr[j+1]=arr[j+1],arr[j]
a=[5,3,8]
bubble(a)
print(a)
# Cell 9972 — Topic: Dictionaries & Sets
s = set([1, 2, 3, 2])
print(s)
# Cell 9973 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9974 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9975  Topic: Loops
while True:
    print('Break')
    break
# Cell 9976 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9977  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9978 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9979 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9980 — Topic: OOP
class Student:
    def __init__(self, name): self.name = name
s = Student('Fahd')
print(s.name)
# Cell 9981 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9982 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9983 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9984 — Topic: CLI Tools
import sys
print(f'Arguments: {sys.argv}')
# Cell 9985 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 9986 — Topic: Dictionaries & Sets
d = {'name': 'Fahd', 'age': 20}
print(d.get('name'))
# Cell 9987 — Topic: Basics
x = 10
y = 20
print(x + y)
# Cell 9988  Topic: Mini Projects
# Palindrome check
def is_pal(s): return s == s[::-1]
print(is_pal('madam'))
# Cell 9989 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9990 — Topic: NumPy
import numpy as np
a = np.array([1, 2, 3])
print(a + 5)
# Cell 9991 — Topic: Matplotlib & Seaborn
import matplotlib.pyplot as plt
plt.plot([1,2],[3,4])
plt.show()
# Cell 9992 — Topic: Data Cleaning
import pandas as pd
df = pd.DataFrame({'A':[1,None,3]})
df = df.fillna(0)
print(df)
# Cell 9993  Topic: Mini Projects
# Calculator
def calc(a,b,op): return eval(f'{a}{op}{b}')
print(calc(5,2,'+'))
# Cell 9994 — Topic: Functions
def square(x): return x*x
print(square(5))
# Cell 9995 — Topic: Matplotlib & Seaborn
import seaborn as sns
import pandas as pd
sns.set()
sns.histplot(pd.Series([1,2,2,3]));
# Cell 9996 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))
# Cell 9997 — Topic: Regex
import re
text = 'email: test@example.com'
print(re.findall(r'\S+@\S+', text))
# Cell 9998 — Topic: Pandas
import pandas as pd
df = pd.DataFrame({'A':[1,2],'B':[3,4]})
print(df)
# Cell 9999 — Topic: Lists & Tuples
lst = [1, 2, 3]
lst.append(4)
print(lst)
# Cell 10000 — Topic: Recursion
def fact(n): return 1 if n==0 else n*fact(n-1)
print(fact(5))

Score: 10000

Category: basics