Learn Python with Jupyter

The book

by Serena Bonaretti

Read about the book on Project Jupyter's blog!

About the Book

The aim of this book is to teach you coding in Python while developing computational thinking—that is, the way we think when coding.
The order of topics is designed to stimulate and strengthen skills such as logic, problem solving, and clean code writing.
Python syntax is explained extensively in a simple but precise way, focusing on concepts and vocabulary.
Topics include data types (strings, lists, dictionaries, etc.), if/else constructs, for loops, while loops, functions, modules, and object‐oriented programming.
Examples are embedded in narrative to provide context and encourage memorization, and they are enriched with suggestions for code pronunciation.
The book includes thirty‐eight chapters, each corresponding to a Jupyter Notebook where you can play with the code explained in the text.
Chapters contain both theoretical exercises, to verify the understanding of concepts, and coding exercises, to learn by doing.
Exercise solutions are described in the community forum, where you can ask questions and propose alternative solutions.
At the end of each chapter, you will find recaps and “in more depth” sections, with suggestions, tips, and curiosities.
The book is written in a simple and colloquial language while being precise and detailed.
The material of this book was tested and refined over more than a thousand hours of one‐on‐one teaching,
with international students of various educational backgrounds.
Next upload: Chapter 27 on June 23


Get the Notebooks for the published chapters. You can download them one by one from below, or all of them at once here

You can download the notebooks in Español de México (translation by Rodrigo Ernesto Álvarez Aguilera)

PART 8: Functions

  1. Stationary for a party
    Function inputs
  2. Username and password
    Function outputs
  3. People's age and odd numbers
    Type and value errors, and return
  4. Factorials
    Recursive functions
  5. Jupyter notebooks and modules
    Working with Jupyter Notebook and an IDE

PART 9: Misc

  1. Online shopping
    Reading and writing text files
  2. Final Python tricks
    What's more in Python

PART 10: Object oriented programming

  1. I need a bank account!
    Classes and objects
  2. Improving a bank account
  3. What if I need a checking account?
  4. I also need a savings account

Join the LPWJ community

The Learn Python with Jupyter (LPWJ) community is a free space where you can find exercise solutions and ask questions
Join us in 3 easy steps!


Create a GitHub account

If you don't have it already, create a free account


Join us

Send us a request to be part of the community



You will get a notification in less than 24 hours