Python Crash Course, 2nd Edition

Python Crash Course, 2nd Edition

A Hands-On, Project-Based Introduction to Programming
by Eric Matthes
May 2019, 544 pp.
ISBN-13: 
9781593279288

Look Inside!

Python Crash Course, 2nd EditionPython Crash Course, 2nd EditionPython Crash Course, 2nd EditionPython Crash Course, 2nd EditionPython Crash Course, 2nd EditionPython Crash Course, 2nd Edition

Featured in I Programmer's Book Watch. Staff pick in Any New Books.

"With a patient and experienced pedagogical style, and a combination of thorough language instruction and plenty of illustrative sample code, Python Crash Course is a terrific way to begin learning computer programming in general and the Python language in particular."
Michael J. Ross, web developer and former Slashdot contributor.

"While Python Crash Course uses Python to teach you to code, it also teaches clean programming skills that apply to most other languages."
—Great Lakes Geek

Download Chapter 2: Variables and Simple Data Types

Python Crash Course is the world’s best-selling guide to the Python programming language. This fast-paced, thorough introduction to programming with Python will have you writing programs, solving problems, and making things that work in no time.

In the first half of the book, you’ll learn basic programming concepts, such as variables, lists, classes, and loops, and practice writing clean code with exercises for each topic. You’ll also learn how to make your programs interactive and test your code safely before adding it to a project. In the second half, you’ll put your new knowledge into practice with three substantial projects: a Space Invaders–inspired arcade game, a set of data visualizations with Python’s handy libraries, and a simple web app you can deploy online.

As you work through the book, you’ll learn how to:

  • Use powerful Python libraries and tools, including Pygame, Matplotlib, Plotly, and Django
  • Make 2D games that respond to keypresses and mouse clicks, and that increase in difficulty
  • Use data to generate interactive visualizations
  • Create and customize web apps and deploy them safely online
  • Deal with mistakes and errors so you can solve your own programming problems

This updated second edition has been thoroughly revised to reflect the latest in Python code and practices. The first half of the book includes improved coverage of topics like f-strings, constants, and managing data. In the second half, the code for the projects has been updated with better structure, cleaner syntax, and more popular and up-to-date libraries and tools, like Plotly and the latest version of Django.

If you’ve been thinking about digging into programming, Python Crash Course will get you writing real programs fast. Why wait any longer? Start your engines and code!

Uses Python 3

Download Resources

Visit the author's websites below for code files, images, updated libraries, and other resources.

Click here for the 2nd Edition

Click here for the 1st Edition

Author Bio 

Eric Matthes is a high school science, math, and programming teacher living in Alaska. He has been writing programs since he was five years old and is the author of the Python Flash Cards, also from No Starch Press.

Table of contents 

Preface to the Second Edition
Introduction

PART I: Basics

Chapter 1: Getting Started
Chapter 2: Variables and Simple Data Types
Chapter 3: Introducing Lists
Chapter 4: Working with Lists
Chapter 5: if Statements
Chapter 6: Dictionaries
Chapter 7: User Input and while Loops
Chapter 8: Functions
Chapter 9: Classes
Chapter 10: Files and Exceptions
Chapter 11: Testing Your Code

PART II: Projects

Project 1: Alien Invasion
Chapter 12: A Ship that Fires Bullets
Chapter 13: Aliens!
Chapter 14: Scoring

Project 2: Data Visualization
Chapter 15: Generating Data
Chapter 16: Downloading Data
Chapter 17: Working with APIs

Project 3: Web Applications
Chapter 18: Getting Started with Django
Chapter 19: User Accounts
Chapter 20: Styling and Deploying an App

Afterword

Appendix A: Installing Python
Appendix B: Text Editors
Appendix C: Getting Help
Appendix D: Using Git for Version Control

View the detailed Table of Contents
View the Index

Reviews 

Featured in I Programmer's Book Watch. Staff pick in Any New Books.

Python Crash Course selected as one of the best books for learning Python by Real Python

"With a patient and experienced pedagogical style, and a combination of thorough language instruction and plenty of illustrative sample code, Python Crash Course is a terrific way to begin learning computer programming in general and the Python language in particular."
Michael J. Ross, web developer and former Slashdot contributor.

“It has been interesting to see, over the last few years, No Starch Press, which produces this book, growing and producing future classics that should be alongside the more traditional O’Reilly Press programming books. Python Crash Course is one of those books.”
Greg Laden, ScienceBlogs

“All of these projects are well thought out and presented in such a way that learning the subject matter and implementing it is much more an enjoyable pastime rather than an onerous task that must be completed. Eric took the time to deal with some rather complex projects and lay them out in a consistent, logical and pleasant manner that draws the reader into the subject willingly, which unfortunately, many authors fail to do.”
Full Circle Magazine

“The book is well presented with good explanations of the code snippets. It works with you, one small step at a time, building more complex code, explaining what's going on all the way.”
FlickThrough Reviews

“Learning Python with Python Crash Course was an extremely positive experience! A great choice if you’re new to Python.”
Mikke Goes Coding

"While Python Crash Course uses Python to teach you to code, it also teaches clean programming skills that apply to most other languages."
—Great Lakes Geek

Extra Stuff 

Visit the author's websites below for code files, images, updated libraries, and other resources.

Click here for the 2nd Edition

Click here for the 1st Edition

Updates 

The author maintains a complete list of updates for each printing of the book. You can find these updates here: https://ehmatthes.github.io/pcc_2e/updates/updates/.