SlideShare a Scribd company logo
程式語言
Programming Languages
Course: 專業外語(二)
Department: 人工智慧應用工程系
Grade: 海青四慧一甲
Teacher: 王暐鈞(Jin Wang)
Date: 2025.03.14 (Week 4)
The 4 technology topics in the course
Artificial Intelligence (AI)
Algorithms
Agile
Programming Languages
An artificial intelligence (AI) project utilizes programming languages such as Python, Java, and C
to develop algorithms for solving specific real-world problems. The project can be executed using
agile methodology, a method that effectively manages and runs iterations for project success.
3
程式語言 Programming Languages
● A programming language is a formal system designed to instruct a computer. It
consists of a set of instructions that can be used to produce various kinds of output.
Programming languages allow developers to communicate with computers and
create software applications. Examples include Python, Java, C++, and JavaScript.
● 程式語言是一種正式的系統,設計來指導
電腦操作,由一組指令組成,可用於生成
各種類型的輸出。程式語言允許開發人員
與電腦進行通信,創建軟體應用。例子包
括 Python、Java、C++ 和 JavaScript 等。
4
Types of Programming Languages
● 高階語言(High-Level Language):
○ Provide a higher abstraction, closer to human natural language
and easy to use.
○ E.g.: Python, Java, C#, JavaScript, Ruby, Swift
● 中階語言(Middle-Level Language):
○ It has high-level and low-level features and is usually used in the
development of system software.
○ E.g.: C, C++
● 低階語言(Low-Level Language):
○ It is closer to machine code and has finer control over the
hardware, but it is also more complex.
○ E.g.: Assembly Language, Machine Language
High-Level
Language
Middle-Level
Language
Low-Level
Language
Computer Hardware
5
程式語言 Programming Languages
● The Programming Language Guide
6
組合語言 (Assembly Language)
● An assembly language is a type of low-level programming language that is intended
to communicate directly with a computer’s hardware. Unlike machine language,
which consists of binary and hexadecimal characters, assembly languages are
designed to be readable by humans.
7
C語言 (C Language)
● The C Language is a high-level, general-purpose programming language developed
by Dennis Ritchie at Bell Labs in the early 1970s. It is widely used for system
programming, embedded systems, and application development due to its
efficiency, portability, and flexibility.
A Brief Introduction to the C Programming Language
8
Java語言 (Java Language)
● The Java Language is a high-performance, cross-platform programming language. It
is characterized by its "Write Once, Run Anywhere" design concept, which means
that the code written once can run on different platforms as long as there is a
Java Virtual Machine (JVM).
9
整合開發環境
Integrated Development Environment (IDE)
● An integrated development environment (IDE) is a software application that helps
programmers develop software code efficiently. It increases developer productivity
by combining capabilities such as software editing, building, testing, and packaging
in an easy-to-use application.
○ “If a workman wishes to do a good job, he must first sharpen his tools” (工欲善其事,必先利其器)
○ E.g.: Visual Studio Code (VSCode), PyCharm, Eclipse, IntelliJ IDEA, Xcode, Android Studio, NetBeans,
Sublime Text, Atom, Jupyter Notebook
10
IDE: Jupyter Notebook
● Jupyter Notebook is an open source interactive web application that supports
interactive computing and data visualization in multiple programming languages.
● Features
○ Interactive
○ Visualization
○ Support Markdown
○ Support LaTeX
11
IDE: Eclipse
● Features
○ Many plugins
○ Debug tools
○ Cross-platform IDE
12
程式語言 Programming Languages
Programming
Languages
Main IDEs Properties
Python PyCharm
Jupyter Notebook
Easy to learn! Widely used in data analysis, AI and Web development fields.
Java Eclipse
IntelliJ IDEA
NetBeans
Cross-platforms! Mainly used in enterprise applications, mobile APPs and large systems.
JavaScript VSCode Mainly used in front-end Web development with dynamic effects.
HTML & CSS VSCode Web development with HTML in structure and CSS in style.
C# VSCode Microsoft released. Mainly used in Windows application, games and enterprise applications.
C++ Code::Blocks The extension of C language. Widely used in games, system programming and performance sensitive
applications.
C Code::Blocks High performance language! Mainly used in system programming and embedded system (嵌入式系統).
Swift Xcode Apple released. Used in iOS APP & macOS applications development.
Kotlin Android Studio Used in Android APP development.
Ruby Simple and powerful. Used in Web development, especially the Ruby on Rails framework.
Go Google released. Focus on performance and readability, suitable for distributed systems (分散式系統).
13
變數 Variables
● 變數(variable)是一個隨時可能改變內容的容器名稱。就像家中的收藏箱,可以
放入各種不同的東西。你需要多大的收藏箱呢?那就要看此收藏箱究竟要放什麼
東西而定。在程式中使用變數也是一樣,當各位程式設計師使用一個變數時,程
式就會配置一塊記憶體給變數使用,而變數名稱就是做為辨識此塊記憶體的標誌。
數值變數
變數名稱:score
1 2 3 4 a p p l e
字串變數
變數名稱:fruit
記憶體位址:0x0003 ~ 0x0007 0x0009 ~ 0x000d
14
變數 Variables
● 宣告變數(declare variable):x
● 命名規則(naming rule):
○ 區分大小寫(case sensitivity):X 和 x 不一樣。
○ 開頭不能是數字:可以是字母、底線(_)或美元符號($)
● 資料型別(data type):int
○ integer (int), floating point (float), string…
● 賦值(assign value):x=5
15
命名規則 Naming Rules
● 區分大小寫(case sensitivity)
○ 大多數程式語言是區分大小寫的,這意味著 Variable 和 variable 是不同的。
● 開頭不能是數字
○ 命名標識符(Identifiers)的開頭不能是數字,可以是字母、底線(_)或美元符號($)。
● 使用有意義的名稱
○ 變數和函數的名稱應該具有描述性,能夠清晰表達其用途。
● 不要使用保留字
○ 避免使用程式語言中的保留字,這是語言的關鍵字,用於構建語法。例如,在Python中 if, for, while是保留字。
● Camel Case, Pascal Case & Snake Case
○ camelCase:第一個單字以小寫開始,後面的每個單字的首字母大寫,例如:myVariableName。
○ PascalCase:每個單字的首字母都大寫,例如:MyFunctionName。
○ snake_case:所有字母小寫,單字之間使用底線分隔,例如:my_variable_name。
● 避免使用單一字母
○ 除非是臨時的循環變數,盡量避免使用單一字母作為變數名稱,除非在特殊情況下。
16
資料型別 Data Types
● 整數(Integer)
○ E.g.: int x = 10;
● 浮點數(Floating Point)
○ E.g.: float y = 3.14;
○ E.g.: double z = 2.718;
● 字符(Character)
○ E.g.: char c = 'A';
● 字串(String)
○ E.g.: String text = "Hello, World!";
● 布林(Boolean)
○ E.g.: boolean isTrue = true;
● 陣列(Array)
○ E.g.: int[] numbers = {1, 2, 3, 4, 5};
● 結構(Struct)或類別(Class)
○ E.g.:
● 空(Void):no return any variable
17
運算子 Operators
● 算術運算子(arithmetic operators):
○ + 加法
○ - 減法
○ * 乘法
○ / 除法
○ % 取餘數
● 比較運算子(logical operators) :
○ == 等於
○ != 不等於
○ < 小於
○ > 大於
○ <= 小於等於
○ >= 大於等於
● 邏輯運算子(logical operators):
○ && 或是 and 邏輯與
○ || 或是 or 邏輯或
○ ! 或是 not 邏輯非
○ E.g.: x > 3 && y < 5
○ E.g.: a >= 7 || z <= 10
● 賦值運算子(assignment operators):
○ = 賦值
○ += 加並且賦值
○ -= 減並且賦值
○ *= 乘並且賦值
○ /= 除並且賦值
○ %= 取餘並且賦值
18
運算子 Operators
● 位元運算子(bitwise operators):
○ & 位元與
○ | 位元或
○ ^ 位元異或
○ << 左位元移動
○ >> 右位元移動
● 其他運算子:
○ . 成員存取
○ [] 陣列元素存取
○ () 函數呼叫
○ ?: 條件運算符(三元運算符)
19
二分搜尋法的流程圖
Binary Search Flowchart
開始
Start
初始化變數
first = 0,
last = length(array)-1
found = False
first<=last
& !found
結束
End
計算中間值
mid = floor((first +last)/2)
array[mid]
== item
想要找的數
item
回傳
found
找到數啦!
found = True
last = mid - 1
Item <
array[mid]
first = mid + 1
20
流程圖 Flowchart
● 流程圖(flowchart)工具用來描述程式執行的流程:
○ 開始/結束(Start/End):橢圓形表示,表示演算法的開始和結束點。
○ 輸入/輸出(Input/Output):平行四邊形表示,表示與外部世界的訊息交換。
○ 流程框(Process):矩形表示,表示一個操作或處理步驟。
○ 判斷(Decision):菱形表示,表示一個判斷操作,根據條件的真假分支到不同的流程。
○ 連接線(Flowline):箭頭指示方向,表示不同步驟之間的流程順序。
○ 預定義的過程(Predefined Process):雙邊矩陣表示,表示已經定義好的子程序或模組。
21
參考資料 References
● Investopedia – Assembly Language
● The Programming Language Guide
● Features of Java
● What is an IDE? Guide to Integrated Development Environment
● Python Integrated Development Environment IDE Software Market
● 在 Jupyter Notebook 中內嵌 Power BI 元件
● Using the Eclipse IDE for Java programming - Tutorial

More Related Content

DOCX
java代写有什么好处?能够节约更多时间-全优代写
PDF
PDF
在生命轉彎的地方 - 從軟體開發職涯,探索人生
PDF
Software Development via A.I.
PDF
The ruby-way
PPT
Django敏捷开发 刘天斯
java代写有什么好处?能够节约更多时间-全优代写
在生命轉彎的地方 - 從軟體開發職涯,探索人生
Software Development via A.I.
The ruby-way
Django敏捷开发 刘天斯

Similar to 專業外語(二)hwhwbajwnjsnansjsjsnsnnsnsnsb-W04.pdf (20)

PPT
软件工程 第七章
PPTX
Interactive Data Language
PPT
第1章 概论
PDF
Recycle Open Source Projects
PDF
2006 recycle opensourceprojects
PDF
漫談 Source Control Management
PPTX
2024/11/29 DevOps Taiwan #64 : 從初建到進階:打造符合公司需求的混合雲端 GitLab DevOps 流水線
PPT
從 Java programmer 的觀點看 ruby
PPTX
用PY实现"Go元编程"
PDF
2020 MLaaS 產業介紹.pdf
PPT
前端开发的那些事儿
DOCX
陳香貝.doc
PPT
信息系统开发平台OpenExpressApp
PDF
初窺 Flutter 開發.pdf
PPT
beidakejian
PDF
開放原始碼作為新事業: 台灣本土經驗談 (COSCUP 2011)
PDF
Xcode tutorial
PPTX
Android JNI
PDF
面試心得
软件工程 第七章
Interactive Data Language
第1章 概论
Recycle Open Source Projects
2006 recycle opensourceprojects
漫談 Source Control Management
2024/11/29 DevOps Taiwan #64 : 從初建到進階:打造符合公司需求的混合雲端 GitLab DevOps 流水線
從 Java programmer 的觀點看 ruby
用PY实现"Go元编程"
2020 MLaaS 產業介紹.pdf
前端开发的那些事儿
陳香貝.doc
信息系统开发平台OpenExpressApp
初窺 Flutter 開發.pdf
beidakejian
開放原始碼作為新事業: 台灣本土經驗談 (COSCUP 2011)
Xcode tutorial
Android JNI
面試心得
Ad

專業外語(二)hwhwbajwnjsnansjsjsnsnnsnsnsb-W04.pdf

  • 1. 程式語言 Programming Languages Course: 專業外語(二) Department: 人工智慧應用工程系 Grade: 海青四慧一甲 Teacher: 王暐鈞(Jin Wang) Date: 2025.03.14 (Week 4)
  • 2. The 4 technology topics in the course Artificial Intelligence (AI) Algorithms Agile Programming Languages An artificial intelligence (AI) project utilizes programming languages such as Python, Java, and C to develop algorithms for solving specific real-world problems. The project can be executed using agile methodology, a method that effectively manages and runs iterations for project success.
  • 3. 3 程式語言 Programming Languages ● A programming language is a formal system designed to instruct a computer. It consists of a set of instructions that can be used to produce various kinds of output. Programming languages allow developers to communicate with computers and create software applications. Examples include Python, Java, C++, and JavaScript. ● 程式語言是一種正式的系統,設計來指導 電腦操作,由一組指令組成,可用於生成 各種類型的輸出。程式語言允許開發人員 與電腦進行通信,創建軟體應用。例子包 括 Python、Java、C++ 和 JavaScript 等。
  • 4. 4 Types of Programming Languages ● 高階語言(High-Level Language): ○ Provide a higher abstraction, closer to human natural language and easy to use. ○ E.g.: Python, Java, C#, JavaScript, Ruby, Swift ● 中階語言(Middle-Level Language): ○ It has high-level and low-level features and is usually used in the development of system software. ○ E.g.: C, C++ ● 低階語言(Low-Level Language): ○ It is closer to machine code and has finer control over the hardware, but it is also more complex. ○ E.g.: Assembly Language, Machine Language High-Level Language Middle-Level Language Low-Level Language Computer Hardware
  • 5. 5 程式語言 Programming Languages ● The Programming Language Guide
  • 6. 6 組合語言 (Assembly Language) ● An assembly language is a type of low-level programming language that is intended to communicate directly with a computer’s hardware. Unlike machine language, which consists of binary and hexadecimal characters, assembly languages are designed to be readable by humans.
  • 7. 7 C語言 (C Language) ● The C Language is a high-level, general-purpose programming language developed by Dennis Ritchie at Bell Labs in the early 1970s. It is widely used for system programming, embedded systems, and application development due to its efficiency, portability, and flexibility. A Brief Introduction to the C Programming Language
  • 8. 8 Java語言 (Java Language) ● The Java Language is a high-performance, cross-platform programming language. It is characterized by its "Write Once, Run Anywhere" design concept, which means that the code written once can run on different platforms as long as there is a Java Virtual Machine (JVM).
  • 9. 9 整合開發環境 Integrated Development Environment (IDE) ● An integrated development environment (IDE) is a software application that helps programmers develop software code efficiently. It increases developer productivity by combining capabilities such as software editing, building, testing, and packaging in an easy-to-use application. ○ “If a workman wishes to do a good job, he must first sharpen his tools” (工欲善其事,必先利其器) ○ E.g.: Visual Studio Code (VSCode), PyCharm, Eclipse, IntelliJ IDEA, Xcode, Android Studio, NetBeans, Sublime Text, Atom, Jupyter Notebook
  • 10. 10 IDE: Jupyter Notebook ● Jupyter Notebook is an open source interactive web application that supports interactive computing and data visualization in multiple programming languages. ● Features ○ Interactive ○ Visualization ○ Support Markdown ○ Support LaTeX
  • 11. 11 IDE: Eclipse ● Features ○ Many plugins ○ Debug tools ○ Cross-platform IDE
  • 12. 12 程式語言 Programming Languages Programming Languages Main IDEs Properties Python PyCharm Jupyter Notebook Easy to learn! Widely used in data analysis, AI and Web development fields. Java Eclipse IntelliJ IDEA NetBeans Cross-platforms! Mainly used in enterprise applications, mobile APPs and large systems. JavaScript VSCode Mainly used in front-end Web development with dynamic effects. HTML & CSS VSCode Web development with HTML in structure and CSS in style. C# VSCode Microsoft released. Mainly used in Windows application, games and enterprise applications. C++ Code::Blocks The extension of C language. Widely used in games, system programming and performance sensitive applications. C Code::Blocks High performance language! Mainly used in system programming and embedded system (嵌入式系統). Swift Xcode Apple released. Used in iOS APP & macOS applications development. Kotlin Android Studio Used in Android APP development. Ruby Simple and powerful. Used in Web development, especially the Ruby on Rails framework. Go Google released. Focus on performance and readability, suitable for distributed systems (分散式系統).
  • 14. 14 變數 Variables ● 宣告變數(declare variable):x ● 命名規則(naming rule): ○ 區分大小寫(case sensitivity):X 和 x 不一樣。 ○ 開頭不能是數字:可以是字母、底線(_)或美元符號($) ● 資料型別(data type):int ○ integer (int), floating point (float), string… ● 賦值(assign value):x=5
  • 15. 15 命名規則 Naming Rules ● 區分大小寫(case sensitivity) ○ 大多數程式語言是區分大小寫的,這意味著 Variable 和 variable 是不同的。 ● 開頭不能是數字 ○ 命名標識符(Identifiers)的開頭不能是數字,可以是字母、底線(_)或美元符號($)。 ● 使用有意義的名稱 ○ 變數和函數的名稱應該具有描述性,能夠清晰表達其用途。 ● 不要使用保留字 ○ 避免使用程式語言中的保留字,這是語言的關鍵字,用於構建語法。例如,在Python中 if, for, while是保留字。 ● Camel Case, Pascal Case & Snake Case ○ camelCase:第一個單字以小寫開始,後面的每個單字的首字母大寫,例如:myVariableName。 ○ PascalCase:每個單字的首字母都大寫,例如:MyFunctionName。 ○ snake_case:所有字母小寫,單字之間使用底線分隔,例如:my_variable_name。 ● 避免使用單一字母 ○ 除非是臨時的循環變數,盡量避免使用單一字母作為變數名稱,除非在特殊情況下。
  • 16. 16 資料型別 Data Types ● 整數(Integer) ○ E.g.: int x = 10; ● 浮點數(Floating Point) ○ E.g.: float y = 3.14; ○ E.g.: double z = 2.718; ● 字符(Character) ○ E.g.: char c = 'A'; ● 字串(String) ○ E.g.: String text = "Hello, World!"; ● 布林(Boolean) ○ E.g.: boolean isTrue = true; ● 陣列(Array) ○ E.g.: int[] numbers = {1, 2, 3, 4, 5}; ● 結構(Struct)或類別(Class) ○ E.g.: ● 空(Void):no return any variable
  • 17. 17 運算子 Operators ● 算術運算子(arithmetic operators): ○ + 加法 ○ - 減法 ○ * 乘法 ○ / 除法 ○ % 取餘數 ● 比較運算子(logical operators) : ○ == 等於 ○ != 不等於 ○ < 小於 ○ > 大於 ○ <= 小於等於 ○ >= 大於等於 ● 邏輯運算子(logical operators): ○ && 或是 and 邏輯與 ○ || 或是 or 邏輯或 ○ ! 或是 not 邏輯非 ○ E.g.: x > 3 && y < 5 ○ E.g.: a >= 7 || z <= 10 ● 賦值運算子(assignment operators): ○ = 賦值 ○ += 加並且賦值 ○ -= 減並且賦值 ○ *= 乘並且賦值 ○ /= 除並且賦值 ○ %= 取餘並且賦值
  • 18. 18 運算子 Operators ● 位元運算子(bitwise operators): ○ & 位元與 ○ | 位元或 ○ ^ 位元異或 ○ << 左位元移動 ○ >> 右位元移動 ● 其他運算子: ○ . 成員存取 ○ [] 陣列元素存取 ○ () 函數呼叫 ○ ?: 條件運算符(三元運算符)
  • 19. 19 二分搜尋法的流程圖 Binary Search Flowchart 開始 Start 初始化變數 first = 0, last = length(array)-1 found = False first<=last & !found 結束 End 計算中間值 mid = floor((first +last)/2) array[mid] == item 想要找的數 item 回傳 found 找到數啦! found = True last = mid - 1 Item < array[mid] first = mid + 1
  • 20. 20 流程圖 Flowchart ● 流程圖(flowchart)工具用來描述程式執行的流程: ○ 開始/結束(Start/End):橢圓形表示,表示演算法的開始和結束點。 ○ 輸入/輸出(Input/Output):平行四邊形表示,表示與外部世界的訊息交換。 ○ 流程框(Process):矩形表示,表示一個操作或處理步驟。 ○ 判斷(Decision):菱形表示,表示一個判斷操作,根據條件的真假分支到不同的流程。 ○ 連接線(Flowline):箭頭指示方向,表示不同步驟之間的流程順序。 ○ 預定義的過程(Predefined Process):雙邊矩陣表示,表示已經定義好的子程序或模組。
  • 21. 21 參考資料 References ● Investopedia – Assembly Language ● The Programming Language Guide ● Features of Java ● What is an IDE? Guide to Integrated Development Environment ● Python Integrated Development Environment IDE Software Market ● 在 Jupyter Notebook 中內嵌 Power BI 元件 ● Using the Eclipse IDE for Java programming - Tutorial