Contents
内容
6 Say Hello to Python
6向Python问好
8 Why Python?
8为什么Python?
10 Equipment You Will Need
10你需要的设备
12 Getting to Know Python
12 Know Python
14 How to Set Up Python in Windows
14如何在Windows中设置Python
16 How to Set Up Python on a Mac
16如何在Mac上设置Python
18 How to Set Up Python in Linux
18如何在Linux中设置Python
20 Installing a Text Editor
20安装文本编辑器
22 Getting Started with Python
22用Python开始
24 Starting Python for the First Time
24次首次启动Python
26 Your First Code
26你的第一个代码
28 Saving and Executing Your Code
28保存并执行代码
30 Executing Code from the Command Line
30从命令行执行代码
32 Numbers and Expressions
32个数与表达式
34 Using Comments
34使用注释
36 Working with Variables
36变量工作
38 User Input
38用户输入
40 Creating Functions
40创造功能
42 Conditions and Loops
42个条件和循环
44 Python Modules
44个Python模块
46 Python Errors
46蟒蛇错误
48 Combining What You Know So Far
48结合你所知道的
50 Working with Data
50与数据一起工作
52 Lists
52列表
54 Tuples
54元组
56 Dictionaries
56词典
58 Splitting and Joining Strings
58拆分串接
60 Formatting Strings
60格式化字符串
62 Date and Time
62日期和时间
64 Opening Files
64打开文件
66 Writing to Files
66对文件的写入
68 Exceptions
68例外
70 Python Graphics
70 Python图形
72 Combining What You Know So Far
72结合你所知道的
74 Using Modules
74使用模块
76 Calendar Module
76日历模块
78 OS Module
78操作系统模块
80 Random Module
80随机模块
82 Tkinter Module
82 Tkinter Module
84 Pygame Module
84 Pygame Module
88 Create Your Own Modules
88创建自己的模块
90 Code Repository
90代码库
92 Python File Manager
92 Python文件管理器
94 Number Guessing Game
94猜数字游戏
96 Polygon Circles
96多边形圆
97 Random Number Generator
97随机数发生器
98 Random Password Generator
98随机密码生成器
99 Keyboard Drawing Script
99键盘绘图脚本
100 Pygame Text Examples
100篇PyGod文本示例
101 Google Search Script
101谷歌搜索脚本
102 Text to Binary Convertor
102文本到二进制转换器
104 Basic GUI File Browser
104基本的GUI文件浏览器
106 Mouse Controlled Turtle
106鼠龟
107 Python Alarm Clock
107蟒蛇闹钟
108 Vertically Scrolling Text
108垂直滚动文本
110 Python Digital Clock
110 Python数字钟
112 Pygame Music Player
112个PyGAME音乐播放器
113 Python Image Slideshow Script
113 Python图像幻灯片脚本
114 Playing music with the Winsound Module
114和Winsound Module一起演奏音乐
116 Text Adventure Script
116文本冒险脚本
118 Python Scrolling Ticker Script
118蟒蛇滚动脚本
119 Simple Python Calculator
119个简单的Python计算器
120 Hangman Game Script
120刽子手游戏剧本
124 Getting Started with Scratch
124开始擦伤
126 Creating Scripts in Scratch
126创建脚本脚本
128 Interaction in Scratch
128划痕相互作用
130 Using Sprites in Scratch
130在抓痕中使用精灵
132 Sensing and Broadcast
132感测广播
134 Objects and Local Variables
134对象与局部变量
136 Global Variables and a Dice Game
136个全局变量和骰子游戏
138 Classes and Objects
138类对象
140 Getting to Know the Command Line
140了解命令行
142 Discovering Unix?
142发现UNIX?
144 Using the Unix Filesystem
144使用UNIX文件系统
146 Listing and Viewing Files
146列出和查看文件
148 Creating and Deleting Files
148创建和删除文件
150 Create and Remove Directories
150创建和删除目录
152 Copying, Moving and Renaming Files
152复制、移动和重命名文件
154 Using the Man Pages
154使用人页
156 Editing Text Files
156编辑文本文件
158 Getting to Know Users
158了解用户
160 Ownership and Permissions
160所有权和权限
162 Useful System and Disk Commands
162有用的系统和磁盘命令
164 Managing Programs and Processes
164管理程序和过程
166 Input, Output and Pipes
166输入、输出和管道
168 Using Grep Pattern Matching
168使用GRIP模式匹配
170 Tab Completion and History
170制表完成和历史
172 Using Python Code in Linux Scripts
172在Linux脚本中使用Python代码
174 Robots, Drones and Cool Python Projects
174机器人、无人机和冷蟒蛇项目
176 Using GitHub
176使用GITHUB
178 Build a CamJam EduKit Robot
178建CamJam EduKit Robot
180 Controlling Your Robot
180控制你的机器人
182 Add Sensors to the Robot
182向机器人添加传感器
184 Amazing Robotics Projects to Try
184个惊人的机器人项目尝试
186 Arcade Machine Projects
186街机工程
188 Security Projects
188安全工程
190 Becoming a Coder
190成为编码器
192 Glossary of Terms
192术语词汇表
|