Python Crash Course

by Eric Matthes

Programming

Book Details

Book Title

Python Crash Course

Author

Eric Matthes

Publisher

Python Crash Course

Publication Date

2023

ISBN

1718502702; 9781718502703

Number of Pages

554

Language

English

Format

PDF

File Size

7.9MB

Subject

Python Programming - Software Development -Web Development

Table of Contents

  • Cover
  • Praise for Python Crash Course
  • Copyright
  • Dedication
  • About the Author and Technical Reviewer
  • Brief Contents
  • Contents in Detail
  • Preface to the Third Edition
  • Acknowledgments
  • Introduction
  • Part I: Basics
  • Chapter 1: Getting Started
  • Setting Up Your Programming Environment
  • Python on Different Operating Systems
  • Running a Hello World Program
  • Troubleshooting
  • Running Python Programs from a Terminal
  • Summary
  • Chapter 2: Variables and Simple Data Types
  • What Really Happens When You Run hello_world.py
  • Variables
  • Strings
  • Numbers
  • Comments
  • The Zen of Python
  • Summary
  • Chapter 3: Introducing Lists
  • What Is a List?
  • Modifying, Adding, and Removing Elements
  • Organizing a List
  • Avoiding Index Errors When Working with Lists
  • Summary
  • Chapter 4: Working with Lists
  • Looping Through an Entire List
  • Avoiding Indentation Errors
  • Making Numerical Lists
  • Working with Part of a List
  • Tuples
  • Styling Your Code
  • Summary
  • Chapter 5: if Statements
  • A Simple Example
  • Conditional Tests
  • if Statements
  • Using if Statements with Lists
  • Styling Your if Statements
  • Summary
  • Chapter 6: Dictionaries
  • A Simple Dictionary
  • Working with Dictionaries
  • Looping Through a Dictionary
  • Nesting
  • Summary
  • Chapter 7: User Input and while Loops
  • How the input() Function Works
  • Introducing while Loops
  • Using a while Loop with Lists and Dictionaries
  • Summary
  • Chapter 8: Functions
  • Defining a Function
  • Passing Arguments
  • Return Values
  • Passing a List
  • Passing an Arbitrary Number of Arguments
  • Storing Your Functions in Modules
  • Styling Functions
  • Summary
  • Chapter 9: Classes
  • Creating and Using a Class
  • Working with Classes and Instances
  • Inheritance
  • Importing Classes
  • The Python Standard Library
  • Styling Classes
  • Summary
  • Chapter 10: Files and Exceptions
  • Reading from a File
  • Writing to a File
  • Exceptions
  • Storing Data
  • Summary
  • Chapter 11: Testing Your Code
  • Installing pytest with pip
  • Testing a Function
  • Testing a Class
  • Summary
  • Part II: Projects
  • Chapter 12: A Ship That Fires Bullets
  • Planning Your Project
  • Installing Pygame
  • Starting the Game Project
  • Adding the Ship Image
  • Refactoring: The _check_events() and _update_screen() Methods
  • Piloting the Ship
  • A Quick Recap
  • Shooting Bullets
  • Summary
  • Chapter 13: Aliens!
  • Reviewing the Project
  • Creating the First Alien
  • Building the Alien Fleet
  • Making the Fleet Move
  • Shooting Aliens
  • Ending the Game
  • Summary
  • Chapter 14: Scoring
  • Adding the Play Button
  • Leveling Up
  • Scoring
  • Summary
  • Chapter 15: Generating Data
  • Installing Matplotlib
  • Plotting a Simple Line Graph
  • Random Walks
  • Rolling Dice with Plotly
  • Summary
  • Chapter 16: Downloading Data
  • The CSV File Format
  • Mapping Global Datasets: GeoJSON Format
  • Summary
  • Chapter 17: Working with APIs
  • Using an API
  • Visualizing Repositories Using Plotly
  • The Hacker News API
  • Summary
  • Chapter 18: Getting Started with Django
  • Setting Up a Project
  • Starting an App
  • Making Pages: The Learning Log Home Page
  • Building Additional Pages
  • Summary
  • Chapter 19: User Accounts
  • Allowing Users to Enter Data
  • Setting Up User Accounts
  • Allowing Users to Own Their Data
  • Summary
  • Chapter 20: Styling and Deploying an App
  • Styling Learning Log
  • Deploying Learning Log
  • Summary
  • Appendix A: Installation and Troubleshooting
  • Appendix B: Text Editors and IDEs
  • Appendix C: Getting Help
  • Appendix D: Using Git for Version Control
  • Appendix E: Troubleshooting Deployments
  • Index
  • Resources
  • Back Cover