My Python World: Learn Python Programming by Playing Minecraft cover

My Python World: Learn Python Programming by Playing Minecraft

No rating yet
Chapters
1
Series
My Python World: Learn Python Programming by Playing Minecraft
ISBN
9787115484345

Tags

Summary

My Python World: Learn Python Programming by Playing Minecraft is a learn-by-playing primer for programming beginners by Cheng Chen, part of the Maker Education series from Posts & Telecom Press (a project in the National Key Books Publishing Plan for the 13th Five-Year Plan). Set in the sandbox game Minecraft, it combines Python fundamentals with hands-on play: plain examples first explain variables, numbers, for loops and if selection structures, while loops, strings, lists, dictionaries, tuples, functions, exceptions, classes and inheritance, and file reading and writing, interspersed with small exercises such as dice rolling and word guessing to reinforce learning; then it moves into setting up the Minecraft programming environment, reading and setting player coordinates, and step by step completes three projects: the Sword Ball mini-game (building the court and goal, handling hit events, judging out-of-bounds and goals, implementing scoring and CSV file logging, adding easter eggs and a timer display), Gomoku (drawing the board, placing stones, handling repeated placement and judging win or loss, restarting) and a pixel image scanner (menu, scanning, copying, demo); the final chapter extends programs beyond the screen, using serial communication between Raspberry Pi and Arduino to control external hardware through the game, such as making a bit switch. With color layouts and a compact length, the book is suitable as a first hands-on Python book for young readers and complete beginners.

Editor's review

很多Python教材失败在没有学习动机:语法讲得清楚,但读者不知道学来干什么。这本书换了一条路:先给你一个好玩的理由,再回头补语法。程式里的每一次for循环、每一个if判断,都会立刻在方块世界里看到结果:球被击飞、棋子落位、像素图被扫描出来,读者会比较自然地产生“再改一行代码”的冲动。 内容编排上,基础语法(变量、循环、分支、字符串、列表、字典、函数、类、文件)一章章铺开,中间穿插掷骰子、猜词这类小任务;后半程完全转为项目制,剑球从搭建球场到比分记录逐层加码,五子棋涉及二维数组与胜负判断,像素扫描仪练习菜单与字符串处理,最后一章通过树莓派加Arduino把程序接到现实硬件,形成了“屏幕—游戏—硬件”的递进。171页的篇幅不厚,彩图排版,不追求语言完备性,更像一张入门地图。 作者程晨有十余年嵌入式与开源硬件经验,是国内较早写Arduino与3D打印普及读物的作者之一,选例偏动手、偏工程感,与一般的语法手册气质不同。若你或孩子喜欢《我的世界》,这本书是很难被拒绝的入门起点;若只想要一本系统的语言参考书,它并不承担这个功能。

Who it's for

A good fit for

  • 喜欢《我的世界》、想用游戏做编程入门的中小学生
  • 完全零基础、被传统语法书劝退的成年初学者
  • 对孩子做STEM/创客课程感兴趣的家长与教师
  • 想给编程课找一个有趣项目的课外班老师
  • 对树莓派、Arduino等开源硬件感兴趣的入门玩家

Not a good fit for

  • 已有一定Python基础、想深入工程实践的程序员
  • 需要系统完备语言参考(如面向对象高级特性、并发、测试)的读者
  • 不具备电脑操作条件或《我的世界》Java版环境的读者
  • 希望阅读纯理论算法与数据结构书籍的读者

Reading tips

  1. 先按第1—3章顺序完成语法练习,不要跳过掷骰子、猜词等小项目,它们为后面游戏项目埋伏笔。
  2. 动手前先按要求准备《我的世界》Java版与Python环境,把书中的示例代码逐行输入并运行,遇到报错先自己排查。
  3. 剑球和五子棋部分建议每完成一小节就玩游戏验证效果,改动参数(速度、范围、颜色)来观察程序行为变化。
  4. 若第9章缺少树莓派或Arduino硬件,可先跳过,把精力放在前面的纯软件项目上,日后再补硬件。
  5. 读完一章用小项目改写:比如把五子棋棋盘尺寸改为15×15,或给扫描仪换掉颜色方案,以此检验自己是否真的掌握了相关知识。

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. Maker Education Series

FAQ

零基础的中小学生能直接读这本书吗?
可以,但建议有成人陪同。书从安装Python、变量和循环讲起,例子都用游戏呈现;不过《我的世界》环境和代码输入对年纪较小的读者有门槛,家长或老师先帮着把环境搭好,孩子跟着做项目会比较顺利。
这本书需要哪种版本的《我的世界》?
书中通过Python与游戏交互,依赖的是能运行第三方接口的Java版(PC版),需在电脑上安装并完成相应准备。手机版、主机版一般无法按书中方法操作,具体接口配置请按书中第4章的准备工作操作。
只学书里的内容,Python算入门了吗?
可以算作入门:覆盖了变量、循环、分支、函数、列表与字典、类与继承、文件读写等核心概念,并通过三个完整项目加以运用。但网络爬虫、数据分析、Web开发等内容未涉及,若要继续深入还需要补充其他学习材料。
书中的项目真的能做出成品吗?
能。书中项目包括可对打的“剑球”、五子棋和像素图像扫描仪,它们都是在游戏中运行的完整小作品,并配有操作演示与完整代码;最后一章还用树莓派配合Arduino把程序接到硬件上控制外部设备。
这本书和2023年的修订版有什么区别?
2018年初版ISBN为978-7-115-48434-5,共171页、定价69元;2023年推出修订版(ISBN 978-7-115-60397-5),内容结构相近,官方推荐语强调“全新修订版内容更丰富”,并突出通过游戏控制Arduino等外部设备的功能。选购时可优先考虑修订版,并按对应ISBN的目录学习。

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