My Python World cover

My Python World

Rating 3.5
Word count
138K words
Chapters
70
ISBN
9787115484345

Tags

Summary

This book introduces the basics of Python programming and uses the game Minecraft as a vehicle for interacting with players or blocks in the game through Python programming, successively realizing several projects including a "sword ball" game, a gobang game and a pixel image scanner, and finally realizing the function of controlling external devices such as Arduino through the game. It is hoped that readers can easily enter the world of Python while playing games, ultimately cross the gap between software and hardware, and make a preliminary attempt at automated control.

This book offers a brand-new experience of learning programming while playing games and is suitable for readers interested in Python programming. Games are no longer just for playing; you will simultaneously experience the roles of super player, designer and programmer.

Editor's review

Written by Cheng Chen and published by Posts & Telecom Press, My Python World is a beginner's guide to Python for programming novices. Centered on hands-on projects, it uses engaging examples to help readers master the basics of Python from scratch. Unlike traditional textbooks with dry grammar explanations, this book embeds programming knowledge in practical scenarios such as game development and data analysis, making learning more interactive and rewarding. Cheng Chen has extensive experience in youth programming education and excels at explaining complex concepts in plain language, with case designs suited to beginners' cognitive level. Structurally, the book progressively covers core concepts such as variables, loops, and functions, and introduces libraries such as Pygame for graphical programming practice; this learn-by-doing approach effectively lowers the barrier to entry. For readers hoping to build logical thinking or explore programming possibilities, this book offers a solid starting point. Note, however, that it emphasizes basic practice over deep theory, making it suitable as a first book rather than a systematic reference manual.

Who it's for

A good fit for

  • Complete beginners interested in programming, especially young readers
  • Newcomers who want to learn Python through project practice
  • Teachers or parents looking for fun programming examples
  • Beginners seeking to build logical thinking and problem-solving skills

Not a good fit for

  • Advanced developers who need to understand Python's underlying mechanisms
  • Readers looking for extensive algorithm or data structure content

Reading tips

  1. Work through each example in chapter order, making sure you understand the code line by line
  2. Practice alongside an online coding environment to verify your results promptly
  3. After the basic chapters, try modifying example parameters on your own to draw inferences

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. 版权信息
  2. 内容提要
  3. 前言
  4. 1 Python基础
  5. 1.1 Python的历史
  6. 1.2 Python的发展
  7. 1.3 Python的优缺点
  8. 1.4 Python的适用领域
  9. 1.5 Python的安装与使用
  10. 1.6 关键字
  11. 1.7 数字
  12. 1.8 变量
  13. 1.9 程序的基本结构
  14. 1.10 掷骰子
  15. 1.11 While
  16. 2 字符串、列表和字典
  17. 2.1 字符串
  18. 2.2 列表
  19. 2.3 函数
  20. 2.4 猜词游戏
  21. 2.5 字典
  22. 2.6 元祖
  23. 2.7 异常
  24. 2.8 函数汇总
  25. 3 类库和方法
  26. 3.1 库
  27. 3.2 面向对象
  28. 3.3 定义类
  29. 3.4 继承
  30. 3.5 文件
  31. 3.6 侵蚀化
  32. 3.7 网络
  33. 4 《Minecraft我的世界》
  34. 4.1 《Minecraft》是什么
  35. 4.2 准备工作
  36. 4.3 欢迎来到《我的世界》
  37. 4.4 位置坐标
  38. 4.5 玩家的位置
  39. 4.6 弹射区域
  40. 5 剑球游戏
  41. 5.1 建造球场
  42. 5.2 击打事件处理
  43. 5.3 球的移动
  44. 5.4 异常情况
  45. 5.5 出界与进球
  46. 6 剑球进阶
  47. 6.1 特殊规则
  48. 6.2 显示数字
  49. 6.3 球门上的比分
  50. 6.4 CSV文件
  51. 6.5 彩蛋:TNT来了
  52. 6.6 显示时间
  53. 7 五子棋
  54. 7.1 绘制棋盘
  55. 7.2 落子
  56. 7.3 五子相连
  57. 7.4 重新开始
  58. 8 图片扫描仪
  59. 8.1 像素画
  60. 8.2 项目介绍
  61. 8.3 操作菜单
  62. 8.4 扫描操作
  63. 8.5 复印操作
  64. 8.6 演示操作
  65. 8.7 完整的代码
  66. 9 硬件控制
  67. 9.1 Raspberry Pi的硬件接口
  68. 9.2 串口通信
  69. 9.3 比特开关
  70. 附录 方块材质名称对照表

FAQ

Does this book require readers to have a background in math or English?
Only junior high school math is needed. All technical terms are explained in Chinese, and the English requirement is minimal.
Do the cases in the book require installing additional software?
You need to install a Python environment. The book includes a detailed setup guide, and all case code can be run directly.
How is this book different from other Python introductory books?
It focuses more on learning driven by fun projects such as games, avoiding pure syntax explanation and placing greater emphasis on practice.

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

程晨 Author

Cheng Chen is an author active in the field of popular Chinese-language computer books; public information about him is limited, and his nationality, dates of birth and death, and educational background cannot be confirmed. Judging from the five works held in the collection, his writing spans visual programming, hardware electronics, introductory Python, HarmonyOS application development, and web game creation. Representative titles include Scratch Programming Basics and Algorithm Advancement, Redstone Electronics, My Python World, Introduction to HarmonyOS App Development, and Learning JavaScript Web Game Development the Easy Way. These books are mostly aimed at beginners and young readers, emphasizing project-based practice over abstract concepts and weaving algorithmic thinking, circuit fundamentals, and coding skills into small hands-on examples that balance interest with a low barrier to entry. His works commonly fall under programming design and general computing categories and suit readers at the introductory stage. Overall, Cheng Chen's writing leans toward practical popular science, stressing hands-on learning and step-by-step progression, giving him a fairly distinct profile among entry-level technology books.

More by the same author

Top rated in the same category