A condensed, modular Python curriculum designed for AI students. Eight level-ranked modules covering Python foundations through data analysis, visualization, NumPy, and introductory machine learning.
| Module | Topics | Notebook | Reference PDF | Challenges |
|---|---|---|---|---|
| Module 1 | Syntax, Variables, Types, Operators, Control Flow, Data Structures, Functions, Scope, List Comprehensions, Lambda | Module_1_Python_Foundations.ipynb | Module_1_Reference.pdf | Module_1_Challenges.ipynb |
| Module 2 | Classes, Inheritance, File I/O, Exceptions, NumPy Arrays, Slicing, Broadcasting | Module_2_OOP_Files_NumPy.ipynb | Module_2_Reference.pdf | Module_2_Challenges.ipynb |
| Module 3 | Pandas, Data Cleaning, Grouping, Matplotlib, End-to-End Mini-Project | Module_3_Pandas_Matplotlib_MiniProject.ipynb | Module_3_Reference.pdf | Module_3_Challenges.ipynb |
| Module 4 | NumPy Review and Practice | Module_4_NumPy_Tutorial.ipynb | — | — |
| Module 5 | Linear Regression Tutorial | Module_5_Linear_Regression_Tutorial.ipynb | — | — |
| Module 6 | Logistic Regression Lab | Module_6_Logistic_Regression_Lab.ipynb | — | — |
| Module 7 | Heart Disease Classification | Module_7_Heart_Disease_Classification.ipynb | — | — |
| Module 8 | Fuel Consumption / CO2 Regression | Module_8_Fuel_Consumption_CO2_Regression.ipynb | — | — |
Sample datasets for exercises and mini-projects:
- data/students.csv - 50 student records with GPA, attendance, department
- data/sales.csv - 100 sales transactions across categories and regions
- data/FuelConsumptionCo2.csv - fuel consumption and CO2 emissions data
- data/ex1data1.txt - one-variable linear regression practice data
- data/ex1data2.txt - multivariable linear regression practice data
- data/heart_cleveland.csv - heart disease classification data
- After Hours Programming - Python
- Learn Python in 10 Minutes
- Python for Scientists
- Python Beginners Guide
The resources/ directory contains 17 reference PDFs organized by topic and module relevance:
| Cheat Sheet | Relevant Modules |
|---|---|
| python-tutorial-afterhours.pdf | Module 1 — Core syntax and concepts |
| python-keywords-cheatsheet.pdf | Module 1 — Keywords and reserved words |
| python-data-structures-cheatsheet.pdf | Module 1 — Lists, dicts, tuples, sets |
| python-functions-tricks-cheatsheet.pdf | Module 1 — Functions, lambdas, list comprehensions |
| python-dense-cheatsheet-finxter.pdf | Module 1–2 — Quick-reference for all basics |
| python-complex-types-cheatsheet-finxter.pdf | Module 1 — Advanced data types |
| python-cheatsheet.pdf | Module 1–2 — General Python reference |
| Cheat Sheet | Relevant Modules |
|---|---|
| python-classes-cheatsheet.pdf | Module 2 — Classes, inheritance, OOP |
| Cheat Sheet | Relevant Modules |
|---|---|
| numpy-cheat-sheet-11.pdf | Module 2, 4 — Array operations and broadcasting |
| numpy-cheatsheet-1.pdf | Module 2, 4 — NumPy essentials |
| numpy-cheatsheet-2.pdf | Module 2, 4 — Array creation and indexing |
| numpy-cheatsheet.pdf | Module 2, 4 — NumPy quick reference |
| numpy-python-cheatsheet.pdf | Module 2, 4 — Full NumPy API overview |
| Cheat Sheet | Relevant Modules |
|---|---|
| pandas-cheatsheet.pdf | Module 3 — DataFrames, grouping, cleaning |
| matplotlib-cheatsheet.pdf | Module 3 — Plotting and visualization |
| Cheat Sheet | Relevant Modules |
|---|---|
| matrix-cheatsheet-table.pdf | Module 5, 8 — Matrix operations for regression |
| Cheat Sheet | Relevant Modules |
|---|---|
| python-coding-interview-questions.pdf | All modules — Practice problems and solutions |
- Python Tutor - Visualize code execution step by step
- Replit - Online Python editor
This project uses uv for fast Python package management and virtual environments.
macOS / Linux:
curl -LsSf https://astral.sh/uv/install.sh | shWindows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"For other methods (pip, Homebrew, etc.), see the official uv installation guide.
From the project root (where this README.md is):
uv venv --python 3.14This creates a .venv/ directory with a self-contained Python interpreter.
uv pip install numpy pandas matplotlib scikit-learn nbconvert nbformat ipykernelWhat each package is for:
| Package | Purpose |
|---|---|
numpy |
Numerical computing (arrays, matrices, math operations) |
pandas |
Data manipulation and analysis (DataFrames) |
matplotlib |
Data visualization and plotting |
scikit-learn |
Machine learning utilities (used in regression and classification modules) |
nbconvert |
Convert notebooks to other formats |
nbformat |
Read/write Jupyter notebook files |
ipykernel |
Jupyter kernel for running notebooks in VS Code/Jupyter |
So VS Code and Jupyter can find this environment:
.venv/bin/python -m ipykernel install --user --name ec-ai-pythonWindows users: Use
.venv\Scripts\python -m ipykernel install --user --name ec-ai-python
Then in VS Code, click the kernel selector (top-right of a notebook) and choose "ec-ai-python".
Run the notebooks from the modules/ directory in VS Code or Jupyter. The data files are referenced as ../data/... (relative to the modules/ folder).
- Open the notebooks in Jupyter, VS Code, or Google Colab
- Each module notebook covers concepts with examples and exercises
- Each challenges notebook contains programming problems for practice
- Reference the PDF documents for detailed concept explanations
- Modules 3, 5, 7, and 8 use the provided data files in the
data/directory
Curriculum designed for the EC AI Student Course. Based on the After Hours Programming Python tutorial and supplemented with modern Python practices.