Python 程式設計入門
學習 Python,這是一門流行的程式語言,涵蓋從網頁與軟體開發到資料科學和品質保證的核心概念。所獲得的技能包括撰寫 Python 3 程式碼以及簡化程式碼。
課程總覽
📚 課程概覽
學習廣受歡迎的程式語言 Python,涵蓋從網頁與軟體開發到資料科學及品質保證等各領域的核心概念。學員將掌握撰寫 Python 3 程式碼的能力,並學會簡化程式邏輯。
核心目標摘要:精通 Python 基礎知識、流程控制、資料結構(清單、字串、字典)、函數、模組與檔案處理,最終導入物件導向程式設計的概念。
🎯 學習目標
- 撰寫並執行基本的 Python 3 腳本,應用基礎語法與內建資料型態(int、float、str)。
- 使用流程控制結構(if/else、for/while 迴圈)實現複雜的程式邏輯,以管理執行路徑。
- 設計並使用函數與模組,使程式更具可重用性與易維護性。
- 有效運用 Python 的核心資料結構,包括清單、字串與字典來管理資料。
- 透過檔案輸入/輸出操作(文字檔、CSV、JSON),與外部資料來源互動。
課程 共 10 课时 · 预计 30.0h
課程
Lesson
This lesson introduces the fundamentals of Python programming, focusing on the print function, variable assignment, and core data types like strings and floats. Students will learn essential syntax rules, including the importance of indentation, code documentation with comments, and the proper use of quotes for textual data.
This lesson introduces control flow as the mechanism for directing program logic beyond simple sequential execution using selection structures like if/else statements. Students will learn to build dynamic programs by utilizing Boolean expressions, relational operators, and logical operators to evaluate conditions and determine execution paths.
This lesson introduces Python lists as versatile, ordered, and mutable sequences defined by square brackets that can store heterogeneous data types. Students will learn how to manipulate lists through indexing, slicing, and methods like append and remove, as well as how to manage complex data using nested list structures.
This lesson introduces iteration as a fundamental programming concept that uses loops to automate repetitive tasks and uphold the "Don't Repeat Yourself" (DRY) principle. Students learn to distinguish between definite iteration using `for` loops for known sequences and indefinite iteration using `while` loops for conditional tasks.
This lesson introduces functions as a fundamental tool for achieving modularity and adhering to the DRY (Don't Repeat Yourself) principle in Python. You will learn how to define and call functions using parameters to eliminate repetitive logic, improve code maintainability, and reduce the risk of errors.
This lesson introduces Python strings as immutable, ordered sequences of Unicode characters that can be defined using single or double quotes. Students will learn how to manipulate these objects using built-in methods and how to access specific characters through both positive and negative indexing.
This lesson introduces Python modules as reusable files that help organize code, prevent naming collisions, and improve maintainability. Students will learn how to use various import methods to access built-in libraries and structure their own projects into logical, manageable components.
This lesson introduces Python dictionaries as mutable, unordered collections that store data in unique key-value pairs for efficient retrieval. Students learn how to initialize dictionaries using curly braces, access values via keys rather than numerical indices, and manage data by adding, updating, or overriding entries.
This lesson introduces file input and output (I/O) as a method for achieving data persistence, allowing information to be stored beyond a program's execution. Students will learn how to use the open() function and various access modes to read, write, and append data to external files while ensuring proper resource management.
This lesson introduces Object-Oriented Programming (OOP) as a design approach that organizes code into self-contained objects by bundling data attributes with their associated methods. Students learn to distinguish between procedural programming and OOP, focusing on how custom classes act as blueprints to create cohesive, reusable, and real-world models of complex entities.