---
# System prepended metadata

title: 第一週筆記

---

# 第一週筆記
## 函式:
print()

## 運算子:

### 算術運算子Arithmetic Operators:

| Operator |          Name          |  Example   |
|:--------:|:----------------------:|:----------:|
|    +     |      Addition加號      | 1 + 1 = 2  |
|    -     |    Subtraction減號     | 1 - 1 = 0  |
|    *     |   Multiplication乘號   | 2 * 2 = 4  |
|    /     |      Division除號      | 2 / 2 = 1  |
|    //    | Floor division整數相除 | 7 // 2 = 3 |
|    %     |     Modulus取餘數      | 7 % 2 = 1  |
|    **    |  Exponentiation取指數  | 2 ** 3 = 8 |

### 關係運算子Comparison Operators:

| Operator |               Name               | Example |
|:--------:|:--------------------------------:|:-------:|
|    <     |          Less than小於           |  1 < 2  |
|    >     |         Greater than大於         |  2 > 1  |
|    <=    |  Less than or equal to小於等於   | 1 <= 2  |
|    >=    | Greater than or equal to大於等於 | 2 >= 1  |
|    ==    |             Equal相等             | 1 == 1  |
|    !=    |         Not equal不相等          | 1 != 2  |

### 指派運算子Assignment Operators:

| Operator |       Name       |    Example     |
|:--------:|:----------------:|:--------------:|
|    =     |       指派       |     x = 7      |
|    +=    |   相加同時指派   |   x += 1 = 8   |
|    -=    |   相減同時指派   |   x -= 1 = 6   |
|   * =    |   相乘同時指派   |  x * = 2 = 14  |
|    /=    |   相除同時指派   |   x /= 7 = 1   |
|   //=    | 整數相除同時指派 |  x //= 2 = 3   |
|    %=    |  取餘數同時指派  |   x %= 2 = 1   |
|  * * =   |  取指數同時指派  | x * * = 2 = 49 |
 
### BMI計算=(體重kg/身高m^2)
x = (體重參數kg)
y = (身高參數m)
BMI = x/y ** 2