相關主題
商品描述
全書共分三部分,第一篇是實驗概述,主要介紹Python語言程序設計實驗的基本目的與要求,電腦程序設計的基本過程,以及問題求解和典型算法介紹;第二篇是基礎實驗篇,包含17個基礎實驗,精心設計實驗內容、實驗項目,包括實驗目的、知識要點、實例解析、實驗內容等,在鞏固課程知識的同時兼顧知識拓展,在實踐過程中做到舉一反三、融會貫通,同時給出了利用Python第三方庫解決數據處理等方面的應用實例,可供不同專業學生選用。第三篇是Python綜合編程實例,每個實驗包括一些趣味性的案例、基本算法,每個實例有題目描述、題目分析、算法設計、程序代碼、運行結果、思考討論、問題拓展等, 註重培養學生分析問題和解決問題的綜合編程能力。本書內容豐富,實踐性強,強調趣味性和實用性,可以作為各類高等院校Python語言程序設計課程的實驗教材,也可以作為廣大編程愛好者學習Python語言程序設計的參考書。
目錄大綱
目 錄
第一篇 Python 程序設計實驗概述
第1 章 Python 程序設計實驗的目的與要求 ···························································.3
1.1 Python 程序設計實驗的目的 ····································································.3
1.2 Python 程序設計實驗的基本要求 ······························································.3
1.3 程序的編寫與測試 ················································································.4
1.4 人才培養與課程學習建議 ·······································································.5
第2 章 問題求解與計算思維 ··············································································.8
2.1 計算概述 ····························································································.9
2.2 求解電腦問題 ··················································································.10
2.3 計算思維 ···························································································.14
2.4 算法 ·································································································.19
2.5 數據結構 ···························································································.23
2.6 算法評價 ···························································································.26
第3 章 典型算法介紹 ·······················································································29
3.1 枚舉算法 ···························································································.29
3.2 遞歸算法 ···························································································.31
3.3 分治算法 ···························································································.34
3.4 遞推算法 ···························································································.35
3.5 貪心算法 ···························································································.36
3.6 回溯算法 ···························································································.38
3.7 迭代算法 ···························································································.40
習題 ········································································································.41
第二篇 基礎實驗
實驗0 Python 環境配置 ····················································································45
一、實驗目的 ····························································································.45
二、知識要點 ····························································································.45
三、實例解析 ····························································································.48
四、實驗內容 ····························································································.50
實驗1 數據的輸入和輸出 ··················································································52
一、實驗目的 ····························································································.52
二、知識要點 ····························································································.52
三、實例解析 ····························································································.53
四、實驗內容 ····························································································.55
實驗2 turtle 繪圖 ····························································································58
一、實驗目的 ····························································································.58
二、知識要點 ····························································································.58
三、實例解析 ····························································································.60
四、實驗內容 ····························································································.62
實驗3 運算符與表達式 ·····················································································64
一、實驗目的 ····························································································.64
二、知識要點 ····························································································.64
三、實例解析 ····························································································.68
四、實驗內容 ····························································································.71
實驗4 字符串 ·································································································75
一、實驗目的 ····························································································.75
二、知識要點 ····························································································.75
三、實例解析 ····························································································.78
四、實驗內容 ····························································································.83
實驗5 選擇結構程序設計 ··················································································86
一、實驗目的 ····························································································.86
二、知識要點 ····························································································.86
三、實例解析 ····························································································.87
四、實驗內容 ····························································································.92
實驗6 循環結構程序設計 ··················································································94
一、實驗目的 ····························································································.94
二、知識要點 ····························································································.94
三、實例解析 ····························································································.96
四、實驗內容 ··························································································.103
實驗7 列表與元組 ························································································.105
一、實驗目的 ··························································································.105
二、知識要點 ··························································································.105
三、實例解析 ··························································································.107
四、實驗內容 ··························································································.112
實驗8 字典與集合 ························································································.116
一、實驗目的 ··························································································.116
二、知識要點 ··························································································.116
三、實例解析 ··························································································.118
四、實驗內容 ··························································································.123
實驗9 函數 ·································································································.126
一、實驗目的 ··························································································.126
二、知識要點 ··························································································.126
三、實例解析 ··························································································.128
四、實驗內容 ··························································································.133
實驗10 文件 ·······························································································.137
一、實驗目的 ··························································································.137
二、知識要點 ··························································································.137
三、實例解析 ··························································································.138
四、實驗內容 ··························································································.141
實驗11 調試和異常處理 ················································································.143
一、實驗目的 ··························································································.143
二、知識要點 ··························································································.143
三、實例解析 ··························································································.145
四、實驗內容 ··························································································.147
實驗12 面向對象程序設計基礎 ·······································································.150
一、實驗目的 ··························································································.150
二、知識要點 ··························································································.150
三、實例解析 ··························································································.151
四、實驗內容 ··························································································.153
實驗13 tkinter 圖形界面設計 ··········································································.155
一、實驗目的 ··························································································.155
二、知識要點 ··························································································.155
三、實例解析 ··························································································.157
四、實驗內容 ··························································································.159
實驗14 Python 科學計算與數據分析 ································································.161
一、實驗目的 ··························································································.161
二、知識要點 ··························································································.161
三、實例解析 ··························································································.163
四、實驗內容 ··························································································.165
實驗15 數據可視化 ······················································································.166
一、實驗目的 ··························································································.166
二、知識要點 ··························································································.166
三、實例解析 ··························································································.167
四、實驗內容 ··························································································.174
實驗16 網絡爬蟲入門 ···················································································.177
一、實驗目的 ··························································································.177
二、知識要點 ··························································································.177
三、實例解析 ··························································································.179
四、實驗內容 ··························································································.182
實驗17 中文詞雲 ·························································································.184
一、實驗目的 ··························································································.184
二、知識要點 ··························································································.184
三、實例解析 ··························································································.186
四、實驗內容 ··························································································.189
第三篇 Python 綜合編程實例
實驗18 趣味數字 ·························································································.193
實例18-1 水仙花數 ·················································································.193
實例 18-2 完全數 ····················································································.198
實例18-3 快樂數 ····················································································.202
實例18-4 不變初心數 ··············································································.205
實驗內容 ································································································.207
實驗19 趣味算法 ·························································································.208
實例19-1 鞍點 ·······················································································.208
實例19-2 猴子選猴王 ··············································································.210
實例19-3 漢諾塔問題 ··············································································.213
實驗內容 ································································································.216
實驗20 趣味邏輯推理 ···················································································.217
實例20-1 猴子吃桃問題 ···········································································.217
實例20-2 雞兔同籠 ·················································································.219
實例20-3 幼兒園分糖果 ···········································································.221
實驗內容 ································································································.223
實驗21 趣味應用實例 ···················································································.225
實例21-1 簡易計算器 ··············································································.225
實例21-2 隨機生成驗證碼 ········································································.227
實驗21-3 超市寄存櫃 ··············································································.229
實例21-4 彩虹瓶 ····················································································.232
實驗內容 ································································································.235
實驗22 字符串應用 ······················································································.237
實例22-1 變位詞 ····················································································.237
實例22-2 詞頻統計 ·················································································.238
實例22-3 加密和解密 ··············································································.241
實驗內容 ································································································.244
參考文獻 ······································································································.245