Python Programming Development Case Tutorial (2nd Edition) cover

Python Programming Development Case Tutorial (2nd Edition)

Rating 3.8
Word count
180K words
Chapters
164
ISBN
9787113309237

Tags

Summary

This book is one of the Applied Talent Development Series textbooks compiled by Heima Programmers, explaining Python programming in concise language. The book is divided into 17 chapters, covering starting the Python learning journey, number types and strings, flow control, lists and tuples, dictionaries and sets, functions, classes and object orientation, modules, file and file path operations, errors and exceptions, regular expressions, processes and threads, network programming, database programming, introduction to the Django framework, detailed explanation of Django core components, and a project practice—Tiantian Shengxian. Each chapter is equipped with a large number of typical examples and teaching resources, allowing readers to learn while practicing, consolidate their knowledge, and improve hands-on development skills in practice.

This book is suitable as a textbook for computer science and other engineering majors in higher education institutions, and can also serve as an auxiliary textbook or self-study reference book for programmers and self-learners.

Editor's review

Written by Heima Programmers for application-oriented talent development, this Python textbook offers comprehensive coverage that progresses from basic syntax, container types, functions, and object-oriented programming to file operations, exception handling, regular expressions, processes and threads, network and database programming, and culminates in the Django framework and the "Tian Tian Sheng Xian" project, forming a progressive path of "syntax—advanced topics—framework—project." Compared with purely theoretical textbooks, its standout feature is the large number of typical examples in every chapter, enabling readers to learn by doing and understand concepts through hands-on practice rather than passive reading. The second edition continues the engineering-practice orientation of the original structure, making it suitable as a course textbook for universities and as a chapter-by-chapter exercise manual for self-learners. Readers should emphasize writing and debugging code, treat each chapter's examples as fundamental skills training, and after finishing the Django section, work through the complete project to develop transferable web development skills.

Who it's for

A good fit for

  • Students in computer science and related engineering majors at universities, using it as a Python course textbook or exercise workbook
  • Programming self-learners with basic syntax needs who want systematic chapter-by-chapter practice and hands-on coding
  • Learners preparing to move into web development who want an introduction to backend development through a Django project
  • Trainees in training programs who need a Python teaching book rich in examples for guided practice

Not a good fit for

  • Complete beginners with no computer background who need to start from operating systems and typing
  • Readers who only want to quickly look up a specific syntax point and do not need a systematic learning path
  • Experienced Python developers seeking in-depth framework source code or advanced architecture design

Reading tips

  1. Proceed chapter by chapter; read the concepts first and then type out all examples yourself, avoiding reading without practicing.
  2. Before learning Django, complete the exercises in earlier chapters to ensure a solid foundation in functions, classes, and databases.
  3. For the project section, it is recommended to rewrite the code independently first, then compare with the book's implementation to fill gaps.
  4. After each chapter, self-test with a small feature and organize errors into notes for repeated practice.

About the publisher

China Railway Publishing House China · Founded in 1951

China Railway Publishing House has long centered on railway professional publishing while also covering rail transit, industrial technology, programming and design, finance and economics, and exam preparation, with about 194 relevant titles in the collection. Representative books include the Automated Operation (FAO) System for Urban Rail Transit, Design Innovation and Practice for Urban Rail Transit Vehicle Depots, Analysis and Application Management of the Level-One Maintenance Inspection Robot System for Electric Multiple Units, as well as engineering practice titles such as the Engineering Summary of the Guangdong Section of the Ganzhou–Shenzhen Railway and Safety Risk Control Technology and Typical Cases of Shield Tunneling in Beijing Urban Rail Transit Construction. Beyond technical monographs, the publisher also offers practical titles such as Python Programming Fundamentals and tax and accounting treatment for real estate development enterprises, with authors including He Peng, Tang Tao, Ding Shukui, and Sun Changjun. Based on public information, its publishing strength lies in drawing on line engineering and operational practice while balancing professional textbooks and general-audience titles; more complete details of its publishing structure are limited in public sources.

Contents

  1. 版权信息
  2. 内容简介
  3. 本书专家委员会
  4. 序言
  5. 前言
  6. 实例索引
  7. 第1章 开启Python学习之旅
  8. 1.1 Python概述
  9. 1.2 搭建Python开发环境
  10. 1.3 快速开发Python程序
  11. 1.4 实例1:打印购物小票
  12. 1.5 实例2:打印功能菜单
  13. 小结
  14. 习题
  15. 第2章 数字类型与字符串
  16. 2.1 数字类型
  17. 2.2 运算符
  18. 2.3 经典实例
  19. 2.4 字符串
  20. 2.5 类型转换
  21. 小结
  22. 习题
  23. 第3章 流程控制
  24. 3.1 条件语句
  25. 3.2 条件嵌套
  26. 3.3 循环语句
  27. 3.4 循环嵌套
  28. 3.5 跳转语句
  29. 小结
  30. 习题
  31. 第4章 列表与元组
  32. 4.1 认识列表
  33. 4.2 列表的遍历和排序
  34. 4.3 添加、删除和修改列表元素
  35. 4.4 嵌套列表
  36. 4.5 认识元组
  37. 小结
  38. 习题
  39. 第5章 字典和集合
  40. 5.1 认识字典
  41. 5.2 字典的基本操作
  42. 5.3 集合的创建方式
  43. 5.4 集合操作与操作符
  44. 小结
  45. 习题
  46. 第6章 函数
  47. 6.1 函数的定义与调用
  48. 6.2 函数的参数传递
  49. 6.3 变量作用域
  50. 6.4 函数的特殊形式
  51. 6.5 常用的内置函数
  52. 小结
  53. 习题
  54. 第7章 类与面向对象
  55. 7.1 面向对象
  56. 7.2 类与对象
  57. 7.3 构造方法
  58. 7.4 类方法和静态方法
  59. 7.5 实例1:航天器信息查询工具
  60. 7.6 继承
  61. 7.7 实例2:人机猜拳游戏
  62. 7.8 多态
  63. 小结
  64. 习题
  65. 第8章 模块
  66. 8.1 模块概述
  67. 8.2 自定义模块
  68. 8.3 模块的导入特性
  69. 8.4 Python的包
  70. 8.5 第三方模块的下载与安装
  71. 8.6 实例1:验证码
  72. 8.7 实例2:文本进度条
  73. 8.8 实例3:高考倒计时器
  74. 小结
  75. 习题
  76. 第9章 文件与文件路径操作
  77. 9.1 文件的打开和关闭
  78. 9.2 从文件中读取数据
  79. 9.3 向文件写入数据
  80. 9.4 文件的定位读/写
  81. 9.5 文件的备份与重命名
  82. 9.6 目录操作
  83. 9.7 文件路径操作
  84. 9.8 实例3:用户登录
  85. 小结
  86. 习题
  87. 第10章 错误和异常
  88. 10.1 错误和异常概述
  89. 10.2 捕获与处理异常
  90. 10.3 抛出异常
  91. 10.4 自定义异常
  92. 10.5 with语句
  93. 10.6 实例:身份归属地查询
  94. 小结
  95. 习题
  96. 第11章 正则表达式
  97. 11.1 基础知识
  98. 11.2 re模块
  99. 11.3 预编译
  100. 11.4 匹配与搜索
  101. 11.5 匹配对象
  102. 11.6 全文匹配
  103. 11.7 检索替换
  104. 11.8 实例2:电影信息提取
  105. 11.9 文本分割
  106. 11.10 贪婪匹配
  107. 11.11 实例3:用户注册验证
  108. 小结
  109. 习题
  110. 第12章 进程和线程
  111. 12.1 进程概述
  112. 12.2 进程的创建方式
  113. 12.3 进程间通信
  114. 12.4线程的概念
  115. 12.5 线程的基本操作
  116. 12.6 线程锁
  117. 12.7 线程同步
  118. 12.8 实例:生产者与消费者模式
  119. 小结
  120. 习题
  121. 第13章 网络编程
  122. 13.1 网络概述
  123. 13.2socket网络编程基础
  124. 13.3 基于UDP的网络聊天室
  125. 13.4 基于TCP的数据转换
  126. 13.5 实例2:TCP文件下载
  127. 13.6 TCP并发服务器
  128. 小结
  129. 习题
  130. 第14章 数据库编程
  131. 14.1 数据库基础知识
  132. 14.2 MySQL与Python交互
  133. 14.3 MongoDB与Python交互
  134. 14.4 Redis与Python交互
  135. 14.5 实例:用户注册与登录
  136. 小结
  137. 习题
  138. 第15章 Django框架入门
  139. 15.1 Web开发基础知识
  140. 15.2 初识Django框架
  141. 15.3 搭建Django环境
  142. 15.4 创建第一个Django项目
  143. 15.5 Django架构之MTV
  144. 小结
  145. 习题
  146. 第16章 Django核心组件详解
  147. 16.1 路由系统
  148. 16.2 模型
  149. 16.3 模板
  150. 16.4 视图
  151. 16.5 实例:用户登录
  152. 小结
  153. 习题
  154. 第17章 项目实战——天天生鲜
  155. 17.1 项目页面展示
  156. 17.2 项目需求分析
  157. 17.3 前期准备工作
  158. 17.4 首页功能实现
  159. 17.5 商品详情页面功能实现
  160. 17.6 商品分类页面功能实现
  161. 17.7 购物车页面功能实现
  162. 17.8 订单提交页面功能实现
  163. 17.9 订单提交成功页面功能实现
  164. 小结

FAQ

What background do I need to start learning from this book?
The book starts from "Starting the Python Learning Journey" and is suitable for readers with basic computer operating skills and some understanding of simple programming concepts. If you have never been exposed to programming, it is advisable to first cover introductory topics such as variables and loops; otherwise, the later object-oriented and Django sections may be difficult.
Is the project in the book suitable for direct use as a job-seeking portfolio piece?
The "Tian Tian Sheng Xian" project covers Django framework fundamentals and core components and is suitable as a complete hands-on project during the learning phase. To use it as a job-seeking portfolio piece, it is recommended to extend features, adjust business logic, and understand every piece of code after completing the book, rather than copying it directly.
Each chapter has many examples; how should I arrange my learning pace if time is limited?
It is recommended to progress chapter by chapter. You can move faster through basic syntax chapters and focus on functions, classes, file operations, and databases, typing out the examples in each chapter at least once. Processes and threads, network programming, and Django can be studied more slowly, with concentrated practice alongside the project.

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.

About the author

Heima Programmer is an IT education brand and textbook-writing team under Itcast (Chuanzhi Education), initiated by Zhang Xiaoxiang. It has long focused on developing practical textbooks in areas such as Java, Python, front-end development, and big data, with many of its works published by Posts & Telecom Press. As a collectively credited author, Heima Programmer is not a single individual but a writing team centered on teaching and course development, and its works emphasize hands-on practice and project-driven learning. The library contains 26 of its titles, including representative works such as Software Testing, Modern Methods of Python Programming, Fundamentals of Microservice Architecture (Spring Boot+Spring Cloud+Docker), Java Web Programming Task Tutorial, JavaScript Front-End Development Case Tutorial, Web Design and Production Project Tutorial (HTML+CSS+JavaScript), PHP Basic Case Tutorial, and Java EE Enterprise Application Development Tutorial (Spring+Spring MVC+MyBatis). These works cover categories such as programming design, software learning, computer fundamentals, and examinations. Its writing style relies on cases and task guidance to serve IT learners at both introductory and advanced levels. Public information is limited, so no further biographical details are provided beyond the above.

More by the same author

Top rated in the same category