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!

🚀 Launch JupyterLite

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:

  1. Variables - Your Coding Backpack
  2. Data Types - Shapes of Information
  3. Conditionals - Choose Your Path
  4. Loops - The Power of Repetition
  5. Lists - Collecting Treasures
  6. Functions - Magic Spells
  7. Dictionaries - The Key Keeper
  8. Fibonacci - The Golden Sequence
  9. Sorting - Organizing Chaos
  10. Number Game - Can You Guess It?
  11. Recursion - The Echo Chamber
  12. 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/_output

Deploy to Your Website

  1. Copy the output folder:

    cp -r jupyterlite/_output/* _site/jupyterlite/
  2. 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/
  1. Test locally:

    cd jupyterlite/_output
    python -m http.server 8000

    Then 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!


🚀 Launch JupyterLite Now