liveBook · Manning

What you will learn in Get Programming: Learn to code with Python

Learn to code with Python

by Ana Bell

Chapter by chapter

Chapter 1: Lesson 1. Why should you learn how to program?

1.1 Why programming matters · 1.2 Where you are now and where you’ll be · 1.3 Our plan for learning how to program · 1.4 Summary

What you learn in chapter 1 →

Chapter 2: Lesson 2. Basic principles of learning a programming language

2.1 Programming as a skill · 2.2 A parallel with baking · 2.3 Think, code, test, debug, repeat · 2.4 Writing readable code · 2.5 Summary

What you learn in chapter 2 →

Chapter 3: Lesson 3. Introducing Python: a programming language

3.1 Installing Python · 3.2 Setting up your workspace · 3.3 Summary

What you learn in chapter 3 →

Chapter 4: Lesson 4. Variables and expressions: giving names and values to things

4.1 Giving names to things · 4.2 Introducing variables · 4.3 Summary

What you learn in chapter 4 →

Chapter 5: Lesson 5. Object types and statements of code

5.1 Types of things · 5.2 Basic type of objects in programming · 5.3 Working with basic types of data values · 5.4 Summary

What you learn in chapter 5 →

Chapter 6: Lesson 6. Capstone project: your first Python program—convert hours to minutes

6.1 Think-code-test-debug-repeat · 6.2 Divide your task · 6.3 Implement the conversion formula · 6.4 Your first Python program: one solution · 6.5 Your first Python program: another solution · 6.6 Summary

What you learn in chapter 6 →

Chapter 7: Lesson 7. Introducing string objects: sequences of characters

7.1 Strings as sequences of characters · 7.2 Basic operations on strings · 7.3 Other operations on string objects · 7.4 Summary

What you learn in chapter 7 →

Chapter 8: Lesson 8. Advanced string operations

8.1 Operations related to substrings · 8.2 Mathematical operations · 8.3 Summary

What you learn in chapter 8 →

Chapter 9: Lesson 9. Simple error messages

9.1 Typing up statements and trying things out · 9.2 Understanding string error messages · 9.3 Summary

What you learn in chapter 9 →

Chapter 10: Lesson 10. Tuple objects: sequences of any kind of object

10.1 Tuples as sequences of data · 10.2 Understanding operations on tuples · 10.3 Summary

What you learn in chapter 10 →

Chapter 11: Lesson 11. Interacting with the user

11.1 Showing output · 11.2 Getting user input · 11.3 Summary

What you learn in chapter 11 →

Chapter 12: Lesson 12. Capstone project: name mashup

12.1 Understanding the problem statement · 12.2 Splitting up first and last names · 12.3 Storing the halves of all names · 12.4 Combining the halves · 12.5 Summary

What you learn in chapter 12 →

Chapter 13: Lesson 13. Introducing decisions in programs

13.1 Making decisions with conditionals · 13.2 Writing the code to make the decision · 13.3 Structuring your programs · 13.4 Summary

What you learn in chapter 13 →

Chapter 14: Lesson 14. Making more-complicated decisions

14.1 Combining multiple conditions · 14.2 Choosing which lines to execute · 14.3 Summary

What you learn in chapter 14 →

Chapter 15: Lesson 15. Capstone project: choose your own adventure

15.1 Outlining the game rules · 15.2 Creating different paths · 15.3 More choices? Yes, please! · 15.4 Summary

What you learn in chapter 15 →

Chapter 16: Lesson 16. Repeating tasks with loops

16.1 Repeating a task · 16.2 Looping a certain number of times · 16.3 Looping N times · 16.4 Summary

What you learn in chapter 16 →

Chapter 17: Lesson 17. Customizing loops

17.1 Customizing loops · 17.2 Looping over strings · 17.3 Summary

What you learn in chapter 17 →

Chapter 18: Lesson 18. Repeating tasks while conditions hold

18.1 Looping while a condition is true · 18.2 Using for loops vs. while loops · 18.3 Manipulating loops · 18.4 Summary

What you learn in chapter 18 →

Chapter 19: Lesson 19. Capstone project: Scrabble, Art Edition

19.1 Understanding the problem statement · 19.2 Dividing your code into pieces · 19.3 Summary

What you learn in chapter 19 →

Chapter 20: Lesson 20. Building programs to last

20.1 Breaking a big task into smaller tasks · 20.2 Introducing black boxes of code in programming · 20.3 Subtasks exist in their own environments · 20.4 Summary

What you learn in chapter 20 →

Chapter 21: Lesson 21. Achieving modularity and abstraction with functions

21.1 Writing a function · 21.2 Using functions · 21.3 Documenting your functions · 21.4 Summary

What you learn in chapter 21 →

Chapter 22: Lesson 22. Advanced operations with functions

22.1 Thinking about functions with two hats · 22.2 Function scope · 22.3 Nesting functions · 22.4 Passing functions as parameters · 22.5 Returning a function · 22.6 Summary

What you learn in chapter 22 →

Chapter 23: Lesson 23. Capstone project: analyze your friends

23.1 Reading a file · 23.2 Sanitizing user inputs · 23.3 Testing and debugging what you have so far · 23.4 Reusing functions · 23.5 Analyzing the information · 23.6 Summary

What you learn in chapter 23 →

Chapter 24: Lesson 24. Mutable and immutable objects

24.1 Immutable objects · 24.2 The need for mutability · 24.3 Summary

What you learn in chapter 24 →

Chapter 25: Lesson 25. Working with lists

25.1 Lists vs. tuples · 25.2 Creating lists and getting elements at specific positions · 25.3 Counting and getting positions of elements · 25.4 Adding items to lists: append, insert, and extend · 25.5 Removing items from a list: pop · 25.6 Changing an element value · 25.7 Summary

What you learn in chapter 25 →

Chapter 26: Lesson 26. Advanced operations with lists

26.1 Sorting and reversing lists · 26.2 Lists of lists · 26.3 Converting a string to a list · 26.4 Applications of lists · 26.5 Summary

What you learn in chapter 26 →

Chapter 27: Lesson 27. Dictionaries as maps between objects

27.1 Creating dictionaries, keys, and values · 27.2 Adding key-value pairs to a dictionary · 27.3 Removing key-value pairs from a dictionary · 27.4 Getting all the keys and values in a dictionary · 27.5 Why should you use a dictionary? · 27.6 Summary

What you learn in chapter 27 →

Chapter 28: Lesson 28. Aliasing and copying lists and dictionaries

28.1 Using object aliases · 28.2 Making copies of mutable objects · 28.3 Summary

What you learn in chapter 28 →

Chapter 29: Lesson 29. Capstone project: document similarity

29.1 Breaking the problem into tasks · 29.2 Reading file information · 29.3 Saving all words from the file · 29.4 Mapping words to their frequency · 29.5 Comparing two documents by using a similarity score · 29.6 Putting it all together · 29.7 One possible extension · 29.8 Summary

What you learn in chapter 29 →

Chapter 30: Lesson 30. Making your own object types

30.1 Why do you need new object types? · 30.2 What makes up an object? · 30.3 Using dot notation · 30.4 Summary

What you learn in chapter 30 →

Chapter 31: Lesson 31. Creating a class for an object type

31.1 Implementing a new object type by using a class · 31.2 Data attributes as object properties · 31.3 Methods as object operations and behaviors · 31.4 Using an object type you defined · 31.5 Creating a class with parameters in __init__ · 31.6 Dot notation on the class name, not on an object · 31.7 Summary

What you learn in chapter 31 →

Chapter 32: Lesson 32. Working with your own object types

32.1 Defining a stack object · 32.2 Using a Stack object · 32.3 Summary

What you learn in chapter 32 →

Chapter 33: Lesson 33. Customizing classes

33.1 Overriding a special method · 33.2 Overriding print() to work with your class · 33.3 Behind the scenes · 33.4 What can you do with classes? · 33.5 Summary

What you learn in chapter 33 →

Chapter 34: Lesson 34. Capstone project: card game

34.1 Using classes that already exist · 34.2 Detailing the game rules · 34.3 Defining the Player class · 34.4 Defining the CardDeck class · 34.5 Simulate the card game · 34.6 Modularity and abstraction with classes · 34.7 Summary

What you learn in chapter 34 →

Chapter 35: Lesson 35. Useful libraries

35.1 Importing libraries · 35.2 Doing mathematical operations with the math library · 35.3 Random numbers with the random library · 35.4 Timing programs with the time library · 35.5 Summary

What you learn in chapter 35 →

Chapter 36: Lesson 36. Testing and debugging your programs

36.1 Working with the unittest library · 36.2 Separating the program from the tests · 36.3 Debugging your code · 36.4 Summary

What you learn in chapter 36 →

Chapter 37: Lesson 37. A library for graphical user interfaces

37.1 A library for graphical user interfaces · 37.2 Setting up a program using the tkinter library · 37.3 Adding widgets · 37.4 Adding event handlers · 37.5 Summary

What you learn in chapter 37 →

Chapter 38: Lesson 38. Capstone project: game of tag

38.1 Identifying the parts to the problem · 38.2 Creating two shapes in a window · 38.3 Moving shapes inside the canvas · 38.4 Detecting a collision between shapes · 38.5 Possible extensions · 38.6 Summary

What you learn in chapter 38 →

Concepts explained in this book

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.