Code in Action: Learn Python Programming with ChatGPT
Tags
Summary
Editor's review
Who it's for
A good fit for
- Programming beginners with no prior experience who want to learn Python with AI-assisted Q&A
- Students who need a complete, clearly structured introductory Python textbook
- Experienced programmers who want to learn how to use ChatGPT for assisted development and integrate it into programs
- Self-taught learners who want to build the habit of using AI to troubleshoot code
Not a good fit for
- Advanced readers with a solid Python background who want to go deeper into algorithms or engineering architecture
- Readers looking for a systematic treatment of data structures and algorithm theory
- Readers who only want to understand ChatGPT's product features and do not intend to learn programming
Reading tips
- Study the chapters in order, type out every code example yourself, and when you hit an error, troubleshoot it yourself before asking ChatGPT.
- After finishing, use ChatGPT to restate each chapter's key points and generate practice questions to check your understanding.
- Use Chapters 14 and 15 to practice with small real projects, integrating ChatGPT into your own scripts to experience collaborative development.
About the publisher
Peking University Press is a comprehensive university press whose publishing areas cover classical literature, popular science, social culture, world history, Western philosophy, and culture. Its catalogue contains 6,031 titles, with representative books including A Dream of Red Mansions, Relativity: The Special and General Theory (15th Edition) (with Einstein's classic papers on unified field theory and other topics), Elements, Conics, The Aristocratic Families of the Eastern Jin, The Philosophy of Mythology (Volume I), The Philosophy of Mythology (Volume II), and The Origin of Continents and Oceans. Representative authors include Cao Xueqin, Zhou Ruchang, Albert Einstein, Euclid, Apollonius, Tian Yuqing, Schelling, and Xian Gang. The press has developed distinctive strengths in classical Chinese literature and in the translation of Western philosophical classics, while also covering scientific classics and social and cultural studies. As public information is limited, this description is based only on the books in the catalogue and offers no further extrapolation.
Contents
- 版权信息
- 内容提要
- 前言
- 第1章 快速上手ChatGPT
- 1.1 ChatGPT的自我介绍
- 1.2 用ChatGPT学Python
- 本章小结
- 第2章 搭建Python开发环境
- 2.1 ChatGPT讲解知识点——Python快速入门
- 2.2 Python环境搭建
- 2.3 ChatGPT答疑解惑
- 本章小结
- 第3章 输入与输出
- 3.1 ChatGPT讲解知识点——Python基础概念
- 3.2 输入输出
- 3.3 ChatGPT答疑解惑
- 本章小结
- 第4章 变量与数据类型
- 4.1 ChatGPT讲解知识点——变量
- 4.2 变量的使用
- 4.3 ChatGPT讲解知识点——数据类型
- 4.4 Python基本数据类型
- 4.5 ChatGPT答疑解惑
- 本章小结
- 第5章 运算
- 5.1 ChatGPT讲解知识点——运算符
- 5.2 算术运算符
- 5.3 赋值运算符
- 5.4 比较运算符
- 5.5 逻辑运算符
- 5.6 位运算符
- 5.7 成员运算符
- 5.8 身份运算符
- 5.9 ChatGPT演示代码——计算BMI
- 5.10 ChatGPT答疑解惑
- 本章小结
- 第6章 控制流
- 6.1 ChatGPT讲解知识点——控制流
- 6.2 条件判断
- 6.3 ChatGPT演示代码——计算BMI升级版
- 6.4 循环
- 6.5 控制流的嵌套
- 6.6 ChatGPT演示代码——猜数字游戏
- 6.7 ChatGPT答疑解惑
- 本章小结
- 第7章 函数
- 7.1 ChatGPT讲解知识点——函数
- 7.2 函数的使用
- 7.3 函数的参数
- 7.4 ChatGPT讲解知识点——匿名函数
- 7.5 变量的作用域
- 7.6 ChatGPT演示代码——绘制字符方阵
- 7.7 ChatGPT答疑解惑
- 本章小结
- 第8章 列表
- 8.1 ChatGPT讲解知识点——列表
- 8.2 列表的常用操作
- 8.3 ChatGPT讲解知识点——列表解析式
- 8.4 ChatGPT讲解知识点——字符串与列表
- 8.5 ChatGPT演示代码——购物清单
- 8.6 ChatGPT答疑解惑
- 本章小结
- 第9章 字典
- 9.1 ChatGPT讲解知识点——字典
- 9.2 字典的常用操作
- 9.3 ChatGPT讲解知识点——del语句
- 9.4 ChatGPT讲解知识点——其他复合数据类型
- 9.5 ChatGPT演示代码——小说中的词频统计
- 9.6 ChatGPT答疑解惑
- 本章小结
- 第10章 模块
- 10.1 ChatGPT讲解知识点——模块
- 10.2 用ChatGPT学Python标准库
- 10.3 用ChatGPT学第三方模块
- 10.4 ChatGPT演示代码——绘制爱心图案
- 10.5 ChatGPT演示代码——一元二次方程计算器
- 10.6 ChatGPT答疑解惑
- 本章小结
- 第11章 文件操作
- 11.1 ChatGPT讲解知识点——文件读写
- 11.2 用ChatGPT学其他类型文件的读写
- 11.3 文件系统操作
- 11.4 ChatGPT演示代码——批量文件搜索器
- 11.5 ChatGPT答疑解惑
- 本章小结
- 第12章 网络爬虫
- 12.1 ChatGPT讲解知识点——网络爬虫
- 12.2 用ChatGPT学网页前端基础知识
- 12.3 requests模块
- 12.4 bs4模块
- 12.5 ChatGPT演示代码——下载Bing每日一图
- 12.6 ChatGPT答疑解惑
- 本章小结
- 第13章 面向对象
- 13.1 ChatGPT讲解知识点——面向对象
- 13.2 Python中的面向对象
- 13.3 ChatGPT演示代码——MOBA游戏角色设计
- 13.4 ChatGPT答疑解惑
- 本章小结
- 第14章 利用ChatGPT辅助开发
- 14.1 ChatGPT讲解知识点——数据分析
- 14.2 ChatGPT开发实例——学生成绩排名及分布
- 本章小结
- 第15章 在程序中接入ChatGPT
- 15.1 OpenAI API
- 15.2 ChatGPT接入实例——智能问答小工具
- 15.3 为ChatGPT提供知识库
- 本章小结
FAQ
I have never programmed before. Can I keep up?
What exactly does the book mean by ChatGPT-assisted programming?
What level will I reach after finishing?
Does the web scraping section require any extra background?
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
Yuan Xin is an author about whom little public information is available. Judging from the four works listed in the library, their writing centers on two areas: programming education and research on the elderly care industry. In the programming books, Yuan Xin uses “Code in Action” as the series title to introduce Python to beginners and incorporates ChatGPT as an aid, covering practical scenarios such as using Python and ChatGPT to handle Excel data analysis efficiently. The writing emphasizes hands-on operation and beginner guidance, highlighting how new tools can lower the learning threshold and improve office efficiency. In the social sciences, Yuan Xin contributed to a research report on the development of the elderly care industry, focusing on happy aging in the context of a Healthy China and showing attention to real-world industry and public policy. Overall, the works combine technology popularization with social issues and are aimed at beginners and readers interested in the elderly care industry.