Python Crash Course, 2nd Edition: A Hands-On, Project-Based Introduction to Programming

Front Cover
No Starch Press, May 3, 2019 - Computers - 544 pages
The best-selling Python book in the world, with over 1 million copies sold!

A fast-paced, no-nonsense, updated guide to programming in Python.


If you've been thinking about learning how to code or picking up Python, this internationally bestselling guide to the most popular programming language is your quickest, easiest way to get started and go! Even if you have no experience whatsoever, Python Crash Course, 2nd Edition, will have you writing programs, solving problems, building computer games, and creating data visualizations in no time.

You’ll begin with basic concepts like variables, lists, classes, and loops—with the help of fun skill-strengthening exercises for every topic—then move on to making interactive programs and best practices for testing your code. Later chapters put your new knowledge into play with three cool projects: a 2D Space Invaders-style arcade game, a set of responsive data visualizations you’ll build with Python's handy libraries (Pygame, Matplotlib, Plotly, Django), and a customized web app you can deploy online.

Why wait any longer? Start your engine and code!
 

Contents

BASICS
1
Variables and Simple Data Types
15
Numbers
25
Summary
32
Introducing Lists
33
Organizing a List
43
Avoiding Index Errors When Working with Lists
46
Working with Lists
49
PROJECTS
223
The _check_events and _update_screen Methods
236
Aliens
255
Making the Fleet Move
265
Scoring
279
53
298
Generating Data
305
Downloading Data
333

Avoiding Indentation Errors
53
Working with Part of a List
61
if Statements
71
Styling Your if Statements
90
Dictionaries
91
User Input and while Loops
113
Using a Flag
120
Functions
129
Passing a List
143
Styling Functions
154
Classes
157
Creating and Using a Class
158
Files and Exceptions
183
51
190
Exceptions
194
Testing Your Code
209
Summary
222
54
351
Working with APIs
359
Getting Started with Django
379
55
393
Summary
407
Styling and Deploying an
437
Deploying Learning Log
448
Summary
463
Afterword
465
Python Keywords and Builtin Functions
471
Getting Help
479
D
485
Checking Out Previous Commits
491
379
497
33
502
Styling Your Code
503
Copyright

Other editions - View all

Common terms and phrases

About the author (2019)

Eric Matthes is a high school math and science teacher living in Alaska who teaches an Introduction to Programming class in Python. He has been writing programs since he was five years old.

Bibliographic information