AI Skill Course Course 2 · Intermediate
Module 01 of 12
Course 2 · Module 01 · 90 minutes

Real Python.
Real notebook.
In your browser.

Welcome to the intermediate course. In the next 90 minutes, you'll write and run real Python — not a tutorial sandbox, the actual language. No install. No setup. Pyodide loads it into your browser and you start writing code in about 30 seconds.

You'll write
10 working cells
You'll load
NumPy + Pandas
You'll plot
Real data with Matplotlib
Start coding
~/learn — python 3.11
>>> import numpy as np
>>> data = np.array([3, 1, 4, 1, 5, 9])
>>> data.mean()
3.8333333333333335
>>> # That just ran in your browser.
>>> # Welcome to Course 2.
>>>
Part 01 · Context

Why Python ate
the whole AI world.

Every major AI company runs Python. Every ML library has Python bindings. Every academic paper publishes Python code. Three reasons.

87%

Of ML jobs require Python

Stack Overflow's 2024 Developer Survey. The next most-required language (JavaScript) is at 28%. The gap isn't closing — it's widening.

The library ecosystem

NumPy. Pandas. Scikit-learn. PyTorch. TensorFlow. Transformers. The entire toolchain of modern AI is in Python — and it's free. None of the alternatives come close.

3

Days to functional, not 3 months

Python is one of the most readable languages ever designed. Most people can read Python before they can write it — which means you start being useful far faster than with C++ or Java.

Part 02 · Hands on

10 cells.
From print("hi")
to a real plot.

Pyodide is loading Python in your browser — it'll take 10-20 seconds the first time. Then every cell below is editable and runnable. Read the narrative, run the code, edit it, run again. Real Python. Real output.

Py
Python runtime Loading Pyodide (~5MB)... 0%
Loading
Tip · Run all cells at once If you want to skim, press the button — every cell executes in sequence and you see the full output.
Part 03 · Reference

The 10 things
you must remember.

Print this. Tape it next to your monitor. By the end of the next 11 modules, you'll know every line by heart.

// 01
Variables & types
# No declaration. Type is inferred. name = "Alice" # string age = 29 # int height = 1.72 # float is_admin = True # bool
// 02
Lists
scores = [88, 92, 75] scores.append(100) # add top = scores[0] # first last = scores[-1] # last chunk = scores[1:3] # slice
// 03
Dictionaries
user = {"name": "Alice", "age": 29} user["email"] = "a@x.com" print(user["name"]) for key, value in user.items(): print(key, value)
// 04
Conditionals
if score >= 90: grade = "A" elif score >= 80: grade = "B" else: grade = "C"
// 05
For loops
for n in [1, 2, 3]: print(n * 2) for i in range(5): # 0..4 print(i)
// 06
Functions
def greet(name, formal=False): if formal: return f"Hello, {name}." return f"Hi {name}!" greet("Alice")
// 07
List comprehensions
# Concise + Pythonic squares = [n**2 for n in range(10)] evens = [n for n in nums if n % 2 == 0]
// 08
Importing libraries
import numpy as np import pandas as pd from sklearn import datasets import matplotlib.pyplot as plt
// 09
NumPy basics
arr = np.array([1, 2, 3, 4]) arr.mean() # 2.5 arr.std() # 1.118... arr * 2 # [2,4,6,8] np.arange(0, 10, 2) # [0,2,4,6,8]
// 10
Pandas DataFrame
df = pd.DataFrame({ "name": ["Alice", "Bob"], "age": [29, 34] }) df.head() df["age"].mean() df[df.age > 30]
Part 04 · Knowledge check

Five questions on what
you just ran.

If you actually ran the cells, these are easy. If you skimmed, scroll back up and run a few.

Question 01 of 05

0/5

Continue
Course 2 · Module 01 complete

You just wrote real Python.
You are now dangerous.

You ran loops, defined functions, used NumPy, manipulated a DataFrame, and plotted real data. That's not "learning Python." That's doing Python. The rest of the course assumes you can read code at this level — and you can.

Up next · Course 2 · Module 02

The data mindset

Real data is messy, missing, duplicated, and wrong. You'll learn the 5 moves every ML practitioner uses to clean it — with a hands-on dataset explorer that lets you see the patterns (and the lies) hidden in real numbers.

Continue to Module 02