Interactive Jupyter Environment
Run Python Code in Your Browser
🎯 Two Ways to Code Interactively
Option 1: JupyterLite (Full Notebook Experience)
JupyterLite provides a complete Jupyter environment running entirely in your browser!
Features: - ✨ Full Jupyter interface with file browser - 💾 Save and download your work - 🔄 Edit and re-run code unlimited times - 📱 Works on phones and tablets - 🌐 No installation or account required
Option 2: Interactive Code on Lesson Pages
Every lesson page has editable code cells that run directly in the page:
- Just click on any code block
- Edit the code
- Run it instantly
- See results immediately
📚 Available Notebooks
All 12 quests are available as interactive Jupyter notebooks:
- Variables - Your Coding Backpack
- Data Types - Shapes of Information
- Conditionals - Choose Your Path
- Loops - The Power of Repetition
- Lists - Collecting Treasures
- Functions - Magic Spells
- Dictionaries - The Key Keeper
- Fibonacci - The Golden Sequence
- Sorting - Organizing Chaos
- Number Game - Can You Guess It?
- Recursion - The Echo Chamber
- Big O - Speed Matters
🛠️ For Instructors: Setting Up JupyterLite
Installation
# Install JupyterLite
pip install jupyterlite-core jupyterlite-pyodide-kernel
# Build the JupyterLite site
cd jupyterlite
jupyter lite build --contents content
# The site will be in jupyterlite/_outputDeploy to Your Website
Copy the output folder:
cp -r jupyterlite/_output/* _site/jupyterlite/Or build during Quarto render:
- JupyterLite builds automatically if configured
- All notebooks in
jupyterlite/content/become available in JupyterLite - Downloadable notebook files are served from
files/lessons/
Test locally:
cd jupyterlite/_output python -m http.server 8000Then visit:
http://localhost:8000
Adding New Notebooks
Add .ipynb files to jupyterlite/content/ for JupyterLite and to files/lessons/ for direct downloads, then rebuild:
jupyter lite build --contents content💡 Tips for Students
In JupyterLite:
- Run a cell: Press
Shift + Enter - Add a cell: Click the
+button - Save your work: File → Download
- Restart if stuck: Kernel → Restart Kernel
On Lesson Pages:
- Code cells are marked with ▶️ Run buttons
- Edit code directly in the cell
- Results appear below the code
- Refresh page to reset all code
🌐 Use on Any Device
Both options work on: - 💻 Desktop computers - 📱 Smartphones
- 🖥️ Tablets - 🖥️ Chromebooks
No installation required - just scan the QR code or click the link!