or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
NKUST ITC 108-1 Python[0]
https://python-slide.macs1207.dev
2019/10/08
tags:
NKUST ITC
Python 社課
Github
社課模式
分組時間
分組分組分組分組分組分組分組分組分組分組分組分組分組分組分組分組分組分組分組分組分組分組分組分組分組分組分組分組分組分組分組分組分組分組
超理想社課進度表
Python是什麼r 我都念Python
簡單地說
環境建置
檢查是否安裝Python
Python 3.X.X
那就是裝好啦
假如沒有?
1. 安裝Python
把"Add Python 3.7 to PATH"打勾
按一下Install Now
再按一下這個
然後Close
Python 3.X.X
pip xx.x.x from …
請找助教幫忙ㄛㄛㄛ
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →資料型態
簡單講物件(Object)
變數(Variable)
這個很重要 會考
輸入與輸出
ㄜ 那是啥
輸出是
電腦顯示給你看(嗎)
那
輸贏輸入?你給電腦的一切。
怎麼寫呢?
輸入一些什麼鬼都行:123
123
不管輸入什麼,input()的回傳值必為String
不要瞎掰好嗎
<class 'str'>
怎麼解決呢?
<class 'int'>
進階一點的話
這樣會輸出:
高科大
資研社
WHYYYY?
print的參數
一堆運算子
兩種不等於
再回到Python的資料型態
1. List
[] [100, 200, 500, 1000] ['銀色的鮮奶', '橙色的鮮奶', '綠色的鮮奶'] [1, 0.9, 'cat', [1,2], fruit] [1, 0.9, 'cat', [1,2], fruit]
經常搭配的方法
要用再查就好
用法像這樣
[1, 2, 3, 4]
2. Tuple
('Jonathan', 'Joseph', 'Jotaro', 'Josuke', 'Giorno' )
('Jonathan', 'Joseph', 'Jotaro', 'Josuke', 'Giorno', 'Jolyne' )
為什麼要加逗號
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →TypeError: can only concatenate tuple (not "str") to tuple
3. Dict(字典)
Physics score = 50
Physics score = 50
{'Chinese': 98, 'English': 65, 'Math': 100, 'History': 77, 'Physics': 50, 'Chemistry': 88}
{'Chinese': 98, 'English': 95, 'Math': 100, 'History': 77, 'Physics': 50, 'Chemistry': 88}
{0: 'hi!', 'Apple': 12.3}
12.3
經常搭配的方法
也是要用再查就行
4. 字串(String)
road roller
o
Discord
Telegram
作者
參考資料