This repository is a two-week, notebook-driven curriculum to practice computational thinking with Python. The path is divided into beginner, intermediate, and advanced tracks, each with clear tasks and validation tests inside the notebooks so learners get immediate feedback.
The fastest way to start learning - click and code in your browser with zero setup:
Click the badge above to launch an interactive Jupyter environment.
What to expect:
- First launch takes 2-3 minutes to build the environment (subsequent launches are faster)
- Everything runs in your browser - no installation needed
- All notebooks and validation tests work perfectly
⚠️ Important: Your work is NOT saved automatically. Download notebooks before closing!
Individual notebook launches:
If you need to save your work across multiple sessions, use Google Colab (requires a free Google account):
- Go to Google Colab
- Click File → Open Notebook → GitHub tab
- Enter repository:
Sakeeb91/computational-thinking-with-python - Select a notebook to open
- Important: Add this setup cell at the top and run it first:
# Run this cell first to set up the environment
!git clone https://github.com/Sakeeb91/computational-thinking-with-python.git
import sys
sys.path.append('/content/computational-thinking-with-python')- Now you can run the rest of the notebook normally
- Your work automatically saves to Google Drive
- Install Python 3.10+.
- Create a virtual environment:
python -m venv .venv && source .venv/bin/activate(Windows:.venv\\Scripts\\activate). - Install tools:
pip install -r requirements.txt. - Launch Jupyter:
jupyter laborjupyter notebook, then open the notebooks innotebooks/. - Each notebook has TODOs to fill in and a "Run tests" cell; keep running it until all checks pass.
notebooks/beginner/— on-ramp to Python, decomposition, and control flow.notebooks/intermediate/— data structures, complexity intuition, recursion, and search.notebooks/advanced/— algorithm design, graphs, experimentation, and evaluation.utils/validation.py— lightweight helpers used by tests inside notebooks.scripts/create_notebooks.py— regenerates the notebook files if you want to tweak content programmatically.requirements.txt— minimal tools for running the notebooks.
Each day is scoped to 60–90 focused minutes. Stretch if you need more practice.
- Day 1: Set up environment; run through
beginner/01_python_basics.ipynb. - Day 2: Finish basics; rerun tests; short reflection on habits.
- Day 3:
beginner/02_decomposition_control.ipynb(decomposition, control flow, small simulations). - Day 4: Extend Day 3 tasks or create a mini kata; journal on abstraction choices.
- Day 5:
intermediate/01_data_structures_complexity.ipynb(lists, dicts, big-O reasoning). - Day 6: Add your own test cases to the same notebook; measure simple timing with
%timeit. - Day 7:
intermediate/02_recursion_search.ipynb(recursion patterns, search in grids). - Day 8: Refactor solutions for clarity; compare recursive vs iterative trade-offs.
- Day 9:
advanced/01_algorithm_design.ipynb(graph search, topological ordering). - Day 10: Add edge cases; sketch alternative approaches.
- Day 11:
advanced/02_experiments_evaluation.ipynb(simulation, streaming, experiment design). - Day 12: Build a mini project by remixing functions from prior notebooks.
- Day 13: Write a short blog-style recap of what you learned; re-run all tests.
- Day 14: Final review, tighten code, and document your personal heuristics.
- Every notebook starts with a short overview and a setup cell that imports
utils.validation. - Tasks include structured TODOs; write your code below the prompt.
- NEW: Each task now has its own code cell and test cell, giving you immediate feedback after completing each accomplishment!
- Task 1 → Code → Test → Task 2 → Code → Test → Task 3 → Code → Test
- This progressive structure helps you build confidence step-by-step
- You can see your progress clearly (1 of 3 done, 2 of 3 done, etc.)
- Tests are intentionally small so you can add more cases as you learn.
- Feel free to duplicate a notebook (e.g.,
01_python_basics_solutions.ipynb) to preserve your first attempt.
- Add a new notebook following the naming convention
XX_topic.ipynb. - Reuse
utils.validationor extend it with custom assertions. - Consider pairing each new task with at least one design reflection: what was decomposed, what was abstracted away, and why.
Happy learning, and keep iterating until all validations are green!