Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Python 程式設計#2 | 資料型態與運算子及變數
29 students

Python 程式設計#2 | 資料型態與運算子及變數

Data Types, Operators, and Variables | Python Programming
Last updated 10/2025
Chinese (Traditional)
EnglishChinese (Traditional)

What you'll learn

  • 知識與技能:定義與管理變數和資料型態 (Knowledge and Skill: Defining and Managing Variables and Data Types)
  • 技能:應用核心運算子 (Skill: Applying Core Operators)
  • 技能:處理字串與格式化輸出 (Skill: Handling Strings and Formatted Output)
  • 技能:能運用與操作容器型資料結構 (Skill: Applying and Manipulating Container Data Structures)

Course content

1 section • 5 lectures • 1h 30m total length
  • Variables and Data Types (Part 1) | 變數與資料型態12:48
  • Variables and Data Types (Part 2) | 變數與資料型態23:56
  • Using Operators | 使用運算子19:13
  • String Manipulation | 字串操作18:01
  • Output and Printing | 輸出列印16:23

Requirements

  • 具有國中數學之能力 (Proficiency in basic mathematics "junior high school level".)
  • 具有電腦基礎知識及資訊素養 (Basic computer knowledge and information literacy.)

Description

本課程聚焦於 Python 程式設計的基礎核心:變數、資料、運算子與輸出。學習者將了解變數由資料型態與變數名稱組成,並須遵守特定的命名規則,例如不可使用保留字。內容詳細介紹了 Python 的主要型態,包括數字、布林值、字串 (str),以及四種容器型態:串列(list)、單一集合(set)、字典(dict)和值組(tuple)。當不同型態需要應用時,必須先進行型態轉型。

此外,課程涵蓋了構成運算式的五大類運算子,核心包含指派、算數、比較和邏輯運算子。並展示了字串操作,如封裝、跳脫字元 (\n),以及使用內建方法 (如 strip(), split()) 處理文本。最終,學習者將掌握 print() 函式,並利用 C 語言相似的格式化字元、.format() 或 Python 3.6 之後的 f-string 進行格式化輸出。


This course focuses on the foundational core of Python programming: variables, data, operators, and output. Learners will understand that variables consist of a data type and a variable name, subject to naming rules like prohibiting reserved words. The content details Python's primary types, including Numeric, Boolean, String (str), and four Container Types: list, set, dictionary (dict), and tuple. Type conversion is necessary when applying different data types.

Furthermore, the material covers the five main operator categories used in expressions, primarily including assignment, arithmetic, comparison, and logical operators. It also demonstrates string operations, such as encapsulation, escape characters (\n), and text processing using built-in methods (e.g., strip(), split()). Finally, learners will master the print() function, utilizing C-style format characters, .format(), or the f-string method (Python 3.6+) for formatted output.

Who this course is for:

  • 對程式設計感興趣的初級開發者 (For beginner developers interested in programming)