Learn Python with Jupyter

The book


by Serena Bonaretti


Get the free book

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.
BOOK COMPLETION 43%
Next upload: Chapter 16 on January 14

DOWNLOAD THE JUPYTER NOTEBOOKS

Get the Notebooks for the published chapters

PART 6: Recap on lists and for loop

  1. List methods and tricks
    List recap
  2. For loop possibilities
    For loop recap
  3. Lists of lists
    Slicing, nested for loops and flattening

PART 7: Dictionaries and string recap

  1. Inventory at the bookstore
    Dictionary
  2. Trip to Switzerland
    Dictionaries with lists as values
  3. Counting, compressing, and sorting
    Dictionary use cases

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
    Encapsulation
  3. What if I need a checking account?
    Inheritance
  4. I also need a savings account
    Polymorphism

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!



1

Create a GitHub account

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

2

Join us

Send us a request to be part of the community

3

Welcome!

You will get a notification in less than 24 hours