Jupyter Notebooks

16 min read

AI engineers use a Jupyter notebook like a rough notebook for code. You try one small step, see the result right away, and then try the next step. This lesson shows how it works, the trap that catches almost everyone, and when to leave it.

New words

Notebook
A file where you write code, run it, and see the results below it.
Cell
One small block of a notebook that holds either code or text.
Output
The result that appears below a cell after you run it.
Kernel
The program behind a notebook that runs your code and remembers your variables.
Markdown
A simple way to write headings, bold text and lists with symbols.
Hidden state
Old values in the kernel that no longer match what the page shows.

What you will learn

  1. Why do AI engineers use notebooks?
  2. What is a notebook?
  3. Code cells and markdown cells
  4. What is the kernel?
  5. The classic trap: hidden state
  6. What does restarting the kernel do?
  7. Where can you run a notebook?
  8. Try it: a notebook with a memory
  9. When should you leave the notebook?
  10. Common mistakes
  11. Explain it to a friend
  12. Key takeaways

10 quiz questions at the end.

Start this lesson

The full lesson, with interactive demos and the quiz, opens after you sign in with Google. It is free.

All lessons · Back to the roadmap