Python程序設計項目化教程(微課視頻版)
劉衍奇、楊斌、田華、陳守森、許強
相關主題
商品描述
"本書由校企聯合開發,具有以下特色:一是兼顧基礎理論和實踐應用,實現從基礎到實踐的全覆蓋,既涵蓋程序設計基礎知識、Python語言基本語法和應用技巧,又包含項目思維,以工程項目演示Python語言實踐應用,便於學生解決實際問題;二是編寫人員既有教學經驗豐富的高校教師,又有企業一線高級工程師,內容與社會崗位需求吻合,章節組織適合教學,語言通俗易懂,既便於教師教學,又便於學生理解;三是不僅提供教學大綱、教案等完整配套資料,而且提供電子活頁、習題庫等拓展資料,還提供相關公眾號,既方便提供前沿配套資料和拓展資料,又能夠為讀者提供技術支持和答疑。 本書既可以作為高校教材,也可以作為自學參考資料。"
目錄大綱
目 錄
第1部分 基 礎 知 識
第1章 運行環境和開發環境...........................................................3
1.1 Python語言簡介 ................................................................................3
1.1.1 程序設計語言簡介 ................................................................4
1.1.2 Python語言 ............................................................................5
1.2 運行環境 ............................................................................................7
1.2.1 硬件運行環境 ........................................................................7
1.2.2 軟件運行環境 ........................................................................8
1.3 開發環境 ..........................................................................................11
1.4 運行Python程序 .............................................................................16
1.4.1 從終端運行程序 ..................................................................16
1.4.2 從PyCharm運行程序 .........................................................18
1.5 實踐訓練 ..........................................................................................20
第2章 建立項目.............................................................................22
2.1 創建項目 ..........................................................................................22
2.1.1 在PyCharm中創建項目 .....................................................23
2.1.2 常見問題 ..............................................................................26
2.2 程序的靈魂——算法 ......................................................................27
2.2.1 算法概念理解 ......................................................................28
2.2.2 常用算法舉例 ......................................................................28
2.2.3 算法評價 ..............................................................................30
2.3 流程圖和三種基本結構 ..................................................................31
2.3.1 流程圖 ..................................................................................31
2.3.2 三種基本結構 ......................................................................31
2.3.3 流程圖舉例 ..........................................................................33
2.4 實踐訓練 ..........................................................................................36
第3章 開發基礎.............................................................................38
3.1 標識符和輸入/輸出 .......................................................................38
3.1.1 標識符 ..................................................................................39
3.1.2 輸入/輸出函數 ...................................................................43
3.2 數據類型和運算符 ..........................................................................45
3.2.1 數據類型 .........................................................................................................46
3.2.2 數據類型轉換 .................................................................................................47
3.2.3 運算符 .............................................................................................................48
3.3 字符串 .........................................................................................................................50
3.3.1 字符串的定義 .................................................................................................51
3.3.2 轉義字符 .........................................................................................................52
3.3.3 字符串格式化 .................................................................................................53
3.3.4 字符串運算符 .................................................................................................55
3.4 列表 .............................................................................................................................55
3.4.1 列表的創建 .....................................................................................................56
3.4.2 列表的訪問 .....................................................................................................57
3.4.3 列表元素的操作 .............................................................................................58
3.4.4 列表訓練 .........................................................................................................66
3.5 元組 .............................................................................................................................68
3.5.1 元組的定義 .....................................................................................................68
3.5.2 元組的創建 .....................................................................................................69
3.5.3 元組的訪問 .....................................................................................................70
3.5.4 元組的遍歷 .....................................................................................................71
3.5.5 修改元組 .........................................................................................................72
3.5.6 刪除元組 .........................................................................................................72
3.6 字典 .............................................................................................................................72
3.6.1 字典的定義 .....................................................................................................73
3.6.2 字典的創建 .....................................................................................................74
3.6.3 字典的訪問 .....................................................................................................74
3.6.4 字典的遍歷 .....................................................................................................75
3.6.5 字典元素的修改 .............................................................................................76
3.6.6 刪除字典 .........................................................................................................76
3.7 實踐訓練 .....................................................................................................................77
第4章 程序結構.....................................................................................................79
4.1 順序結構 .....................................................................................................................79
4.2 選擇結構 .....................................................................................................................80
4.2.1 選擇結構流程圖 .............................................................................................82
4.2.2 條件表達式 .....................................................................................................82
4.2.3 if語句 ..............................................................................................................84
4.2.4 選擇結構嵌套 .................................................................................................88
4.2.5 條件運算符構成的選擇結構 .........................................................................91
4.2.6 選擇結構的應用 .............................................................................................92
4.3 循環結構 .....................................................................................................................97
4.3.1 循環結構的流程圖 .........................................................................................97
4.3.2 while語句 .......................................................................................................98
4.3.3 for語句 ............................................................................................................99
4.3.4 break語句和continue語句 ..........................................................................100
4.3.5 循環結構嵌套與算法效率 ...........................................................................103
4.3.6 循環結構的應用 ...........................................................................................105
4.4 實踐訓練 ...................................................................................................................109
第5章 函數...........................................................................................................111
5.1 函數的定義和調用 ...................................................................................................111
5.1.1 函數的定義 ...................................................................................................112
5.1.2 函數的調用 ...................................................................................................112
5.2 函數的參數 ...............................................................................................................113
5.2.1 參數的類型和形式 .......................................................................................113
5.2.2 函數的返回值 ...............................................................................................118
5.3 嵌套和遞歸 ...............................................................................................................119
5.3.1 函數的嵌套調用 ...........................................................................................119
5.3.2 函數的遞歸調用 ...........................................................................................120
5.4 變量的作用域 ...........................................................................................................121
5.4.1 局部變量 .......................................................................................................121
5.4.2 全局變量 .......................................................................................................122
5.5 常用的內置函數和標準庫函數 ...............................................................................124
5.5.1 內置函數 .......................................................................................................124
5.5.2 標準庫函數 ...................................................................................................127
5.6 實踐訓練 ...................................................................................................................129
第6章 開發進階...................................................................................................131
6.1 班級出勤統計 ...........................................................................................................131
6.1.1 Matplotlib工具包 .........................................................................................132
6.1.2 繪制曲線圖 ...................................................................................................134
6.1.3 繪制散點圖 ...................................................................................................136
6.1.4 繪制柱狀圖 ...................................................................................................137
6.1.5 繪制直方圖 ...................................................................................................138
6.2 學生學籍管理 ...........................................................................................................140
6.2.1 面向對象編程基礎 .......................................................................................142
6.2.2 面向對象編程應用 .......................................................................................148
6.2.3 面向對象編程拓展 .......................................................................................155
6.3 實踐訓練 ...................................................................................................................159
第2部分 綜 合 實 訓
綜合實訓1 課堂電子考勤軟件............................................................................163
任務7.1 填寫項目確認單 ..............................................................................................163
任務7.2 環境搭建 ..........................................................................................................165
任務7.3 界面設計 ..........................................................................................................171
任務7.4 功能設計 ..........................................................................................................177
任務7.5 測試 ..................................................................................................................181
任務7.6 驗收 ..................................................................................................................185
綜合實訓2 智能翻譯軟件....................................................................................188
任務8.1 填寫項目確認單 ..............................................................................................188
任務8.2 環境搭建 ..........................................................................................................189
任務8.3 界面設計 ..........................................................................................................195
任務8.4 功能設計 ..........................................................................................................197
任務8.5 測試 ..................................................................................................................204
任務8.6 驗收 ..................................................................................................................206
綜合實訓3 AI手寫數字識別軟件 ......................................................................208
任務9.1 填寫項目確認單 ..............................................................................................208
任務9.2 環境搭建 ..........................................................................................................209
任務9.3 界面設計 ..........................................................................................................211
任務9.4 功能設計 ..........................................................................................................214
任務9.5 測試 ..................................................................................................................223
任務9.6 驗收 ..................................................................................................................224
綜合實訓4 高數問題求解軟件............................................................................226
任務10.1 填寫項目確認單 ............................................................................................226
任務10.2 環境搭建 ........................................................................................................227
任務10.3 界面設計 ........................................................................................................230
任務10.4 功能設計 ........................................................................................................233
任務10.5 測試 ................................................................................................................245
任務10.6 驗收 ................................................................................................................246
參考文獻...................................................................................................................248