Computer Programming Language - Lecture 1: Introduction Python
1.
Computer Programming Language
NguyenTuan Hung
Department of Materials Science and Engineering
National Taiwan University
https://nguyen-group.github.io/
1. Introduction Python
2.
Contents
Introduce programminglanguage
Why Python and how it works
Introduce JupyterLab
Installing JupyterLab and VS code
Writing and running Python code on VS Code + JupyterLab
2
3.
What is aprogramming language?
How to communicate with computer?
3
Hi Compute,
Please calculate 1 + 1
???
But computer wouldn’t respond because it doesn’t understand human language!
(without AI assistant)
4.
What Is aProgramming Language?
Programming language allows us to communicate instructions in a way
computer can understand → highly structured and logical (same for every
computer, one sentence has only one meaning)
4
2
print(1+1)
Result
5.
How Many ProgrammingLanguages?
5
Easy
Hard
Natural
language
Hi Compute,
Please calculate 1 + 1
High-level
language
print(1 + 1)
Low-level
language
int main() {
printf("%dn", 1 +1);
return 0;}
Machine
language
000010000100
100001000000
6.
How Python ActuallyWorks?
6
https://datawithbaraa.substack.com/
Python is an interpreted language
High-level → Low-level (by CPython) → Machine code → Output
7.
How Python ActuallyWorks?
7
CPython is the default Python interpreter, which is written in C program.
Default