用 Python 做商管程式設計 (一) 03. 條件式選擇與程式碼排版

NTU OCW X NTU MOOC 課程名稱:用 Python 做商管程式設計 (一) 授課教師:資訊管理學系 孔令傑 NTU OCW 連結:https://ocw.aca.ntu.edu.tw/courses/mo... NTU MOOC 連結:https://www.coursera.org/learn/pbc1 --------------- 本週我們介紹條件式選擇,說明如何用 if-else 敘述句來讓程式「看情況做選擇」,並且搭配邏輯運算子讓選擇判斷更具有彈性與威力;我們也介紹邏輯運算子並據此做更複雜的條件式選擇。此外,如果希望能有效率地開發程式,程式碼的良好排版是必要的,因此我們也用一點時間說明 Python 程式的排版原則。 --------------- 00:00:35 03-a01 型態轉換 00:10:00 03-a02 更多輸入輸出 00:22:12 03-a03 更多指派運算 00:29:59 03-b01 if 條件判斷式 00:46:36 03-b02 if-else 條件判斷式 00:55:53 03-b03 布林值與比較運算子 01:09:38 03-c01 巢狀 if-else 01:21:49 03-c02 三元 if-else 與 else-if 01:33:33 03-d01 邏輯運算子 (上) 01:39:35 03-d02 邏輯運算子 (下) 01:50:36 03-e01 排版與寫作風格

用 Python 做商管程式設計 (一) 05. 清單資料結構與作業管理演算法
▶︎

用 Python 做商管程式設計 (一) 05. 清單資料結構與作業管理演算法

用 Python 做商管程式設計 (一) 04. 電腦運作基本原理與迴圈結構
▶︎

用 Python 做商管程式設計 (一) 04. 電腦運作基本原理與迴圈結構

考完 iPAS AI,為什麼我選 AIoT?補上 AI 最容易忽略的一段 |iPAS AIoT 初級
▶︎

考完 iPAS AI,為什麼我選 AIoT?補上 AI 最容易忽略的一段 |iPAS AIoT 初級

用 Python 做商管程式設計 (二) 03. 資料結構 (Data Structure)、檔案讀寫、與例外處理
▶︎

用 Python 做商管程式設計 (二) 03. 資料結構 (Data Structure)、檔案讀寫、與例外處理

JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Course | Intellipaat
▶︎

JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Course | Intellipaat

2026【資訊科技:從Python到Machine Learning入門 #02】上課錄影 python入門教學 #python #machinelearning
▶︎

2026【資訊科技:從Python到Machine Learning入門 #02】上課錄影 python入門教學 #python #machinelearning

【漫士科普】90分钟深度!一口气看明白人工智能和神经网络#人工智能 #神经网络
▶︎

【漫士科普】90分钟深度!一口气看明白人工智能和神经网络#人工智能 #神经网络

科学禁地 | 老高與小茉 Mr & Mrs Gao
▶︎

科学禁地 | 老高與小茉 Mr & Mrs Gao

很有愛的家庭,也會養出恐怖情人!恐怖情人有哪些特質?該怎麼和平分手?ft. 諮商心理師 黃柏嘉《強者我朋友》EP 228|志祺七七
▶︎

很有愛的家庭,也會養出恐怖情人!恐怖情人有哪些特質?該怎麼和平分手?ft. 諮商心理師 黃柏嘉《強者我朋友》EP 228|志祺七七

Place your brain in the frequency of wealth, prosperity and total abundance - Attraction Law
▶︎

Place your brain in the frequency of wealth, prosperity and total abundance - Attraction Law

用 Python 做商管程式設計 (二) 01. 函數 (Functions and Fruitful Functions)
▶︎

用 Python 做商管程式設計 (二) 01. 函數 (Functions and Fruitful Functions)

用 Python 做商管程式設計 (二) 02. 字串 (Strings)
▶︎

用 Python 做商管程式設計 (二) 02. 字串 (Strings)

用 Python 做商管程式設計 (三) 03. 程式演算在經濟學的應用
▶︎

用 Python 做商管程式設計 (三) 03. 程式演算在經濟學的應用

Jfrog | Jfrog Artifactory | Jfrog Artifactory Tutorial | Artifactory Tutorial | Intellipaat
▶︎

Jfrog | Jfrog Artifactory | Jfrog Artifactory Tutorial | Artifactory Tutorial | Intellipaat

為什麼全球開發者都離不開 VS Code 這個軟體?新手必學的完整入門指南,一次搞懂 7 大核心功能!
▶︎

為什麼全球開發者都離不開 VS Code 這個軟體?新手必學的完整入門指南,一次搞懂 7 大核心功能!

Hangzhou, Don’t Cry for Me! Why Did the Ten-Year Wealth Dream of the "Number One Digital Economy ...
▶︎

Hangzhou, Don’t Cry for Me! Why Did the Ten-Year Wealth Dream of the "Number One Digital Economy ...

Peach Yellow Screen
▶︎

Peach Yellow Screen

用 Python 做商管程式設計 (二) 04. 用 Python 分析財金資料
▶︎

用 Python 做商管程式設計 (二) 04. 用 Python 分析財金資料

How to Start Coding | Programming for Beginners | Learn Coding | Intellipaat
▶︎

How to Start Coding | Programming for Beginners | Learn Coding | Intellipaat

用 Python 做商管程式設計 (三) 01. 類別與物件
▶︎

用 Python 做商管程式設計 (三) 01. 類別與物件