Notebooks
Notebooks: Notebooks: Code, Results and Notes Together, Your First Notebook in VS Code, The Kernel: Why Run Order Matters.
Updated
- Notebooks: Code, Results and Notes Together (Novice): A notebook is a file of cells, code cells and Markdown cells, that keeps each cell's result saved under it, like a scientist's lab notebook; an .ipynb file holds all of it as JSON, notebooks suit exploring and showing data, and a .py file suits code you reuse and test.
- 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.
- 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.