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.
Conditions of Use
This book is licensed under a Creative Commons License (CC BY-NC-SA). You can download the ebook Learn Python with Jupyter for free.
- Title
- Learn Python with Jupyter
- Publisher
- LearnPythonWithJupyter.com
- Author(s)
- Serena Bonaretti
- Published
- 2024-06-23
- Edition
- 1
- Format
- eBook (pdf, epub, mobi)
- Pages
- 245
- Language
- English
- License
- CC BY-NC-SA
- Book Homepage
- Free eBook, Errata, Code, Solutions, etc.
PART 1: Creating the basics Text, questions, and art strings, input(), and print() Events and favorites Variables and string concatenation PART 2: Introduction to lists and if/else statements In a bookstore Lists and if... in... / else... Grocery shopping List methods: .append() and .remove() Customizing the burger menu List methods: .index(), .pop(), and .insert() Traveling around the world List slicing Senses, planets, and a house Changing, adding, and removing list elements using slicing PART 3: Introduction to the for loop My friends' favorite dishes for... in range() At the zoo For loop with if... == ... / else Where are my gloves? For loop for searching Cleaning the mailing list For loop to change list elements What a mess at the bookstore! For loop to create new lists PART 4: Numbers and algorithms Implementing a calculator Integers, floats, and arithmetic operations Playing with numbers Common operations with lists of numbers Fortune cookies The Python module random Rock paper scissors Introduction to algorithms PART 5: The while loop and conditions Do you want more candies? The while loop Animals, unique numbers, and sums Various kinds of conditions And, or, not, not in Combining or reversing conditions Behind the scenes of comparisons and conditions Booleans