Python Crash Course: A Hands-On, Project-Based Introduction to Programming (3rd Edition) cover

Python Crash Course: A Hands-On, Project-Based Introduction to Programming (3rd Edition)

Rating 4.6
Word count
416 words
Chapters
32
Series
A Hands-On, Project-Based Introduction to Programming
ISBN
9787115613639

Tags

Summary

This book is the Chinese edition of the third edition of the globally bestselling Python introductory tutorial known as the "Python Crash Course." The original title is Python Crash Course: A Hands-On, Project-Based Introduction to Programming. The book is divided into two major parts: "Basics" and "Projects." Part I consists of 11 chapters, starting with setting up a programming environment and proceeding through variables and simple data types, lists and working with lists, if statements, dictionaries, user input and while loops, functions, classes, files and exceptions, and testing your code. Each concept is accompanied by runnable examples, and each chapter ends with hands-on exercises. Part II ties the earlier knowledge together through three complete projects: Project 1, "Alien Invasion," uses Pygame to build a simple 2D shooting game, completing an armed spaceship, an alien fleet, and a scoring system in turn; Project 2, "Data Visualization," uses Matplotlib and Plotly to generate data, download data, and access online data through APIs to create interactive charts; Project 3, "Web Applications," uses Django to build a learning log website, including user accounts, page styling, and deployment. The third edition's code has been fully revised for Python 3.11, switches to VS Code as the editor, adds coverage of removeprefix() and removesuffix(), uses pytest for the testing section, and updates the usage of Matplotlib and Plotly. The appendices include practical material on installation and troubleshooting, text editors and IDEs, getting help, version control with Git, and deployment troubleshooting.

Editor's review

如果你只想买一本 Python 入门书,这本几乎是最不需要犹豫的选择。它的讲解节奏非常克制:每引入一个概念,都先给出最小可运行的例子,再解释原理,最后用练习让你亲手写一遍,几乎不给「看懂但写不出」留空子。第 3 版值得一提的升级在于环境与工具链:全书代码基于 Python 3.11,编辑器从旧版工具的写法改为 VS Code,测试部分使用 pytest 而不是作者自写工具,Matplotlib 与 Plotly 的项目代码也按新版本重写。这意味着照着书敲代码时,你不会频繁卡在「版本对不上、报错查不到」的挫败感里。第二个亮点是项目设计的分层:2D 游戏训练事件循环和类与对象,数据可视化训练读取数据和调用 API,Django 项目训练多文件组织、用户系统和部署,三个项目覆盖了自学者最容易半途而废的三个方向。对零基础读者来说,它更像一份有人陪着走完的学习路线,而不只是语法手册。

Who it's for

A good fit for

  • 完全没有编程经验、想系统学会 Python 的零基础读者
  • 需要一门语言完成课程作业或毕业设计的高校学生
  • 想从 Excel、脚本工具转向编程的数据分析、运营从业者
  • 希望带孩子或自学入门的教师、家长与自学者

Not a good fit for

  • 已有扎实 Python 基础、只想查阅进阶特性的开发者
  • 想专门学习爬虫、机器学习、Web 后端深度内容的读者
  • 偏好纯理论讲解、不需要动手项目的读者

Reading tips

  1. 第一部分逐章精读并动手敲完练习,不要在没写代码的情况下跳到下一章。
  2. 第二部分只挑一个最感兴趣的项目完整做完,做完再回头补另外两个项目。
  3. 遇到报错先自己读错误信息、用搜索引擎查,再对照附录 A 和附录 E 排查环境问题。
  4. 学完后用书中项目结构做一个自己的小项目,把三个项目的知识点串起来。

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. The first two editions' praise for this book
  2. Recommendations
  3. Notes on the third edition revision
  4. Preface
  5. Acknowledgments
  6. Part I: Basics
  7. Chapter 1: Getting Started
  8. Chapter 2: Variables and Simple Data Types
  9. Chapter 3: Introducing Lists
  10. Chapter 4: Working with Lists
  11. Chapter 5: if Statements
  12. Chapter 6: Dictionaries
  13. Chapter 7: User Input and while Loops
  14. Chapter 8: Functions
  15. Chapter 9: Classes
  16. Chapter 10: Files and Exceptions
  17. Chapter 11: Testing Your Code
  18. Part II: Projects
  19. Project 1: Alien Invasion: Chapter 12: Armed Spaceship
  20. Chapter 13: Aliens
  21. Chapter 14: Scoring
  22. Project 2: Data Visualization: Chapter 15: Generating Data
  23. Chapter 16: Downloading Data
  24. Chapter 17: Working with APIs
  25. Project 3: Web Applications: Chapter 18: Getting Started with Django
  26. Chapter 19: User Accounts
  27. Chapter 20: Styling and Deploying an App
  28. Appendix A: Installation and Troubleshooting
  29. Appendix B: Text Editors and IDEs
  30. Appendix C: Getting Help
  31. Appendix D: Version Control with Git
  32. Appendix E: Deployment Troubleshooting

FAQ

这本书适合零基础的人自学吗?
适合。全书从安装 Python 和编辑器讲起,不预设任何编程经验;每个概念都配有小例子和章末练习,是公认的零基础入门教材。但仍需保持每天动手写代码的习惯,只读不练效果很差。
第3版和前两版有什么区别?
第 3 版代码基于 Python 3.11 全面修订,编辑器改为 VS Code,新增 removeprefix() 和 removesuffix() 等新特性讲解,测试章节改用 pytest,并更新了 Matplotlib、Plotly 的项目代码。已有的旧版读者一般不必再买,新读者直接选第 3 版即可。
书里的项目需要提前会其他技术吗?
不需要。游戏项目用 Pygame,可视化项目用 Matplotlib 和 Plotly,Web 项目用 Django,书中都会从头讲解安装和基本用法。读者只需跟着章节顺序做完第一部分的语法学习。
这本书和《流畅的Python》有什么区别?
本书是面向初学者的入门教材,重点在建立编程基础和完成项目;《流畅的Python》面向已有一定 Python 经验的开发者,深入讲解语言特性和惯用法。两者定位不同,可以先后阅读。
配套代码和资源在哪里获取?
出版社和图灵社区(ituring.com.cn)的本书页面提供随书代码、PPT 课件等配套资源,纸质书前言中也会给出获取方式说明。建议先按书中版本号配置环境再运行代码。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

More by the same author

Top rated in the same category