1. 程式人生 > >《Python編程快速上手 讓繁瑣工作自動化》pdf

《Python編程快速上手 讓繁瑣工作自動化》pdf

com 安裝 elif 擴展 找到 文件 開發 link back

<div id="article_content" class="article_content tracking-ad" data-mod="popu_307" data-dsm="post">

<p><br>
</p>
<p>下載地址:<a target="_blank" href="https://page74.ctfile.com/fs/14147674-202805986">網盤下載</a></p>
<p><br>
</p>
<p><br>
</p>
<p></p>
<h2 style="margin:24px 0px 3px; padding:0px; font-size:15px; font-weight:normal; color:rgb(0,119,34); line-height:22.5px"><a name="t0" target="_blank"></a>
<span>內容簡介</span>&nbsp;&nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·</h2>
<div class="indent" id="link-report" style="margin:0px; padding:0px; word-break:break-all; color:rgb(17,17,17); font-family:Helvetica,Arial,sans-serif; line-height:15.552px">
<div style="margin:0px; padding:0px">
<div class="intro" style="margin:0px; padding:0px">
<p style="margin-top:0px; margin-bottom:0px; text-indent:2em; word-break:normal">
<a href="http://lib.csdn.net/base/python" class="replace_word" title="Python知識庫" target="_blank" style="color:#df3434; font-weight:bold;">Python</a>是一種高級程序設計語言,因其簡潔、易讀及可擴展性日漸成為程序設計領域備受推崇的語言。</p>
<p style="margin-top:0px; margin-bottom:0px; text-indent:2em; word-break:normal">
本書通過編寫一個個小巧、有趣的遊戲來教授<a href="http://lib.csdn.net/base/python" class="replace_word" title="Python知識庫" target="_blank" style="color:#df3434; font-weight:bold;">python</a>編程,並且采用直接展示了遊戲的源代碼,通過實例來解釋編程的原理的方式。全書共21章,14個遊戲程序和示例貫穿其中,介紹了Python基礎知識、數據類型、函數、流程控制、程序調試、流程圖設計、字符串操作、列表和字典、圖形和動畫、碰撞檢測、聲音和圖像等方方面面的程序設計知識。本書可以幫助讀者在輕松有趣的過程中,掌握Python遊戲編程的基本技能。</p>
<p style="margin-top:0px; margin-bottom:0px; text-indent:2em; word-break:normal">
本書適合不同年齡和層次的Python編程初學者閱讀。</p>
</div>
</div>
<div class="report" style="margin:0px; padding:0px; text-align:right; visibility:hidden">
<a target="_blank" rel="nofollow" href="https://book.douban.com/subject/26868640/#" style="color:rgb(187,187,187); text-decoration:none; background-color:transparent"></a></div>
</div>
<h2 style="margin:24px 0px 3px; padding:0px; font-size:15px; font-weight:normal; color:rgb(0,119,34); line-height:22.5px"><a name="t1" target="_blank"></a>
<span>作者簡介</span>&nbsp;&nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·</h2>
<div class="indent " style="margin:0px; padding:0px; word-break:break-all; color:rgb(17,17,17); font-family:Helvetica,Arial,sans-serif; line-height:15.552px">
<div style="margin:0px; padding:0px">
<div class="intro" style="margin:0px; padding:0px">
<p style="margin-top:0px; margin-bottom:0px; text-indent:2em; word-break:normal">
Al Sweigart是加利福尼亞州舊金山的一名軟件開發者。他很喜歡騎自行車、當誌願者、泡咖啡吧以及開發有用的軟件。他編寫了《Python遊戲編程快速上手》《Python和Pygame遊戲開發指南》《Python密碼學編程》《Python編程快速上手——讓繁瑣工作自動化》等圖書,深受讀者歡迎。他生於德克薩斯的休斯頓。他在德克薩斯大學Austin分校讀完了計算機科學學位。</p>
</div>
</div>
</div>
<h2 style="margin:24px 0px 3px; padding:0px; font-size:15px; font-weight:normal; color:rgb(0,119,34); line-height:22.5px"><a name="t2" target="_blank"></a>
<span>目錄</span>&nbsp;&nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·</h2>
<div class="indent" id="dir_26868640_full" style="margin:0px; padding:0px; word-break:break-all; color:rgb(17,17,17); font-family:Helvetica,Arial,sans-serif; line-height:15.552px">
第1章 安裝Python 1<br>
1.1 下載和安裝Python 1<br>
1.2 啟動IDLE 2<br>
1.3 如何使用本書 3<br>
1.4 尋求在線幫助 4<br>
第2章 交互式shell 6<br>
2.1 一些簡單的數學知識 6<br>
2.2 計算表達式 7<br>
2.4 本章小結 12<br>
第3章 編寫程序 13<br>
3.1 字符串 13<br>
3.2 字符串連接 14<br>
3.3 在IDLE的文件編輯器中編寫程序 14<br>
3.4 Hello World! 15<br>
3.5 保存程序 16<br>
3.6 打開保存過的程序 16<br>
3.7 “Hello World”程序如何工作 18<br>
3.8 變量名稱 20<br>
3.9 本章小結 21<br>
第4章 “猜數字”遊戲 22<br>
4.1 “猜數字”遊戲的運行示例 22<br>
4.2 “猜數字”遊戲的源代碼 23<br>
4.3 import語句 24<br>
4.4 random.randint()函數 25<br>
4.5 循環 26<br>
4.6 語句塊 26<br>
4.7 布爾數據類型 27<br>
4.8 比較操作符 28<br>
4.9 條件 28<br>
4.10 =和==的區別 30<br>
4.11 while循環語句 30<br>
4.12 使用int()函數、float()函數、str()<br>
函數和bool()函數來轉換值 31<br>
4.14 if語句 33<br>
4.15 用break語句提早離開循環 34<br>
4.16 流程控制語句 36<br>
4.17 本章小結 36<br>
第5章 Jokes 38<br>
5.1 用好print()函數 38<br>
5.2 Jokes遊戲的運行示例 38<br>
5.3 Jokes遊戲的源代碼 38<br>
5.4 轉義字符 39<br>
5.5引號和雙引號 40<br>
5.6 print()的end關鍵字參數 41<br>
5.7 本章小結 42<br>
第6章 Dragon Realm 43<br>
6.1 函數 43<br>
6.2 如何玩“Dragon Realm” 43<br>
6.3 Dragon Realm遊戲的運行示例 44<br>
6.4 Dragon Realm的源代碼 44<br>
6.5 def語句 46<br>
6.6 布爾操作符 47<br>
6.7 返回值 51<br>
6.8 全局作用域和局部作用域 51<br>
6.9 形參(parameter) 53<br>
6.10 設計遊戲 56<br>
6.11 本章小結 57<br>
第7章 使用調試器 58<br>
7.1 Bug! 58<br>
7.2 調試器 59<br>
7.3 單步執行 61<br>
7.4 查找Bug 63<br>
7.5 斷點 66<br>
7.6 使用斷點的示例 67<br>
7.7 本章小結 68<br>
第8章 流程圖 69<br>
8.1 如何玩Hangman 69<br>
8.2 Hangman的運行示例 69<br>
8.3 ASCII字符圖 71<br>
8.4 用流程圖來設計一個程序 71<br>
8.5 生成流程圖 73<br>
8.6 本章小結 79<br>
第9章 Hangman 81<br>
9.1 Hangman的源代碼 81<br>
9.2 多行字符串 86<br>
9.3 常量 86<br>
9.4 列表 86<br>
9.5 方法 91<br>
9.6 字符串方法lower()和upper() 91<br>
9.7 列表方法reverse()和append() 92<br>
9.8 列表方法split() 93<br>
9.9 range()函數和list()函數 95<br>
9.10 for循環 96<br>
9.11 切片 98<br>
9.12 elif (“Else If”)語句 101<br>
9.13 本章小結 108<br>
第10章 Hangman擴展 109<br>
10.1 字典 110<br>
10.2 random.choice()函數 113<br>
10.3 多變量賦值 114<br>
10.4 本章小結 116<br>
第11章 Tic Tac Toe 117<br>
11.1 Tic Tac Toe的運行示例 117<br>
11.2 Tic Tac Toe的源代碼 118<br>
11.3 設計程序 123<br>
11.4 遊戲AI 124<br>
11.5 引用 129<br>
11.6 短路求值 137<br>
11.7 None值 140<br>
11.8 本章小結 146<br>
第12章 Bagels 147<br>
12.1 Bagels的運行示例 147<br>
12.2 Bagels的源代碼 148<br>
12.3 random.shuffle()函數 151<br>
12.4 復合賦值操作符 153<br>
12.5 列表方法sort() 154<br>
12.6 字符串方法join() 155<br>
12.7 字符串插值 157<br>
12.8 本章小結 160<br>
第13章 笛卡爾坐標 161<br>
13.1 網格和笛卡爾坐標 161<br>
13.2 負數 163<br>
13.3 數學技巧 164<br>
13.4 絕對值和abs()函數 166<br>
13.5 計算機屏幕的坐標系 167<br>
13.6 本章小結 167<br>
第14章 Sonar Treasure Hunt 168<br>
14.1 Sonar Treasure Hunt的<br>
運行示例 169<br>
14.2 Sonar Treasure Hunt的源代碼 173<br>
14.3 設計程序 179<br>
14.4 找到最近的藏寶箱的算法 185<br>
14.5 列表方法remove() 187<br>
14.6 本章小結 195<br>
第15章 Caesar Cipher 196<br>
15.1 密碼學 196<br>
15.2 凱撒密碼 197<br>
15.3 ASCII碼以及用數字表示字母 198<br>
15.4 函數chr()和ord() 199<br>
15.5 凱撒密碼的運行示例 200<br>
15.6 Caesar Cipher的源代碼 201<br>
15.7 代碼如何工作 202<br>
15.8 字符串方法isalpha() 204<br>
15.9 字符串方法isupper()和<br>
islower() 205<br>
15.10 暴力破解 207<br>
15.11 本章小結 209<br>
第16章 Reversi 210<br>
16.1 Reversi的運行示例 211<br>
16.2 Reversi的源代碼 215<br>
16.3 代碼如何工作 223<br>
16.4 bool()函數 231<br>
16.5 本章小結 244<br>
第17章 Reversi AI模擬 245<br>
17.1 讓計算機和自己下棋 245<br>
17.2 百分數 250<br>
17.3 round()函數 251<br>
17.4 AISim2.py的運行示例 252<br>
17.5 比較不同的AI算法 252<br>
17.6 本章小結 259<br>
第18章 圖形和動畫 260<br>
18.1 安裝Pygame 260<br>
18.2 Pygame中的Hello World 261<br>
18.3 Hello World的源代碼 261<br>
18.4 運行Hello World程序 263<br>
18.5 元組 264<br>
18.6 RGB顏色 265<br>
18.7 字體和pygame.font.SysFont()<br>
函數 266<br>
18.8 屬性 267<br>
18.9 構造函數 269<br>
18.10 Pygame的繪制函數 269<br>
18.11 事件和遊戲循環 272<br>
18.12 動畫 273<br>
18.13 Animation程序的源代碼 274<br>
18.14 Animation程序如何工作 276<br>
18.15 運行程序循環 279<br>
18.16 本章小結 282<br>
第19章 碰撞檢測與鼠標/鍵盤的輸入 284<br>
19.1 Collision Detection程序的<br>
源代碼 284<br>
19.2 Collision Detection算法 288<br>
19.3 當遍歷一個列表的時候,<br>
不要修改該列表 292<br>
19.4 鍵盤輸入程序的源代碼 293<br>
19.5 colliderect()方法 300<br>
19.6 本章小結 301<br>
第20章 聲音和圖像 302<br>
20.1 聲音文件和圖像文件 303<br>
20.2 精靈和聲音程序 303<br>
20.3 Sprites and Sounds程序的<br>
源代碼 304<br>
20.4 pygame.transform.scale()函數 308<br>
20.5 本章小結 311<br>
第21章 Dodger 312<br>
21.1 回顧Pygame的基本數據類型 312<br>
21.2 Dodger的源代碼 313<br>
21.3 全屏模式 322<br>
21.4 遊戲循環 325<br>
21.5 事件處理 325<br>
21.6 move_ip()方法 328<br>
21.7 pygame.mouse.set_pos()函數 331<br>
21.8 修改Dodger遊戲 335<br>
21.9 本章小結 335</div>
<br>
<p></p>
<p><br>
</p>
<p><br>
</p>
<p>下載地址:<a target="_blank" href="https://page74.ctfile.com/fs/14147674-202805986">網盤下載</a><br>
</p>

</div>

《Python編程快速上手 讓繁瑣工作自動化》pdf