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.
Syncing
xxxxxxxxxx
Class slide ver.
bearrrrrrro 2020/5/23
sylveon 2021/5/7 修改
語法
加上一些東西
試試看
作用
- 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 →概念
一些不知道不影響你打code但是知道比較好的東西
更多簡單的範例
電腦
__init__
是比較特殊的函式,會在「建構物件」時自動呼叫(後面有範例)xxx.yyy
指"xxx的yyy",有點類似之前在import一些工具中的用法人
baba
Remark: class中的函式第一個參數要放self,不然可能會噴錯或是發生奇怪的事情(?
Remark:
__init__
中參數的名稱可以任意,像是我也可以這樣寫但名稱不一致可能造成混淆而且沒有必要,除了可以少打幾個字以外沒有任何好處
用class
Instance
Instance 又稱為「實體」,依照class真的某個東西做出來
有了class以後,我們可以造出多個狀態和功能類似的東西

連連看
解答
練習1
小明不小心把墨水打翻在他的code上,請幫小明通靈被墨水蓋掉的資訊
特殊方法(補充) + 練習2
解答
繼承(補充)
Same!