Notebooks

Notebooks: Your First Notebook in VS Code, The Kernel: Why Run Order Matters.

Updated

  1. Your First Notebook in VS Code (Novice): Make a notebook in VS Code, choose the project's .venv Python as its kernel, run code cells with Shift+Enter, see that a cell shows its last line's value while print() shows every line it prints, add a Markdown cell, and save the code, results and notes in one .ipynb file.
  2. The Kernel: Why Run Order Matters (Apprentice): A notebook's kernel remembers every name its cells made, in the order they ran rather than the order on the page, so a cell run twice or a deleted cell's variable gives answers the file can't reproduce; execution counts show the real order, Restart and Run All gives the file's true answers, the Variables view lists what the kernel remembers, and Interrupt stops a cell that runs too long.