3/28筆記
===
畫圖套件
---
**scatter**:畫出散點圖
**axis**:呈現出正方形方格
**xlim**:設置x軸範圍
**ylim**:設置y軸範圍
```python=
#使用畫圖套件 matplotlib.pyplot
import matplotlib.pyplot as plt
a=[1,2,3,4,5]
b=[1,2,3,4,5]
plt.scatter(x=a,y=b,s=5)
plt.axis('square')
plt.xlim(0,10)
plt.ylim(0,10)
print(f'我的圖形')
plt.show()
```

字典
---
### 走訪字典
```
for x in dict:
print(x)
走訪所有鍵
```
```python=
dict={"apple": 40, "banana" :60, "cherry" :80, "mango":20, "pineapple":50, "papaya": 90}
forx in dict:
print (x)
```

```
for x in dict.values():
print(x)
走訪所有值
```
```python=
dict={"apple": 40, "banana":60, "cherry":80, "mango":20, "pineapple":50, "papaya": 90}
for x in dict.values():
print(x)
```

```
for x,y in dict.items():
print(x,y)
走訪所有配對
```
```python=
dict={"apple": 40, "banana": 60, "cherry": 80,"mango": 20,"pineapple": 50,"papava" : 90}
for x,y in dict.items ():
print(x,y)
```

字串
---
**字串切片&擷取字元**

**求字串長度**

作業
---
#### 第一題: 求”麥禮仁“的學號

#### 第二題:求所有姓陳的同學的學號姓名

#### 第三題:求全班同學有哪幾個姓氏&同學姓名是否有重複

#### 第四題:歡迎{a}同學參加我們的營隊活動
